VijayAnand.CommonTemplates
1.1.0
Prefix Reserved
dotnet new install VijayAnand.CommonTemplates::1.1.0
Common CLI Templates
For now, a project template for defining a source generator to automate the source code generation and is named as sourcegen
.
Install Package
To install the template NuGet package, use the below .NET CLI command:
dotnet new install VijayAnand.CommonTemplates
If you've already installed this package, then it can be updated to the latest version with the below command:
dotnet new update --check-only
dotnet new update
Project Options:
Note: These options may also be combined.
To support the incremental source generator, it takes the below optional parameter:
-inc
|--incremental
- Default value isfalse
.
To support the XML-based solution file (slnx
) format.
This would be an explicit option since the SLNX feature is currently in the preview stage and is only supported on VS2022.
-slnx
|--use-slnx
- Default value isfalse
.
Option to include a reference to the PolySharp NuGet package.
-ips
|--include-polysharp
- Default value isfalse
.
Command Usage
Use the below .NET CLI command to create the project out these template:
dotnet new sourcegen -n XamlAutomation
Incremental Source Generator:
dotnet new sourcegen -n XamlAutomation -inc
Use SLNX solution file format:
dotnet new sourcegen -n XamlAutomation -slnx
Include PolySharp NuGet package:
dotnet new sourcegen -n XamlAutomation -ips
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Join me on Developer Thoughts (https://egvijayanand.in/), an exclusive blog for articles on .NET MAUI and Blazor.
What's new in ver. 1.1.0:
-------------------------
1. Introduced an option to support the XML-based solution file (slnx) format.
This would be an explicit option since the SLNX feature is currently in the preview stage and is only supported on VS2022.
-slnx | --use-slnx - Default value is false
dotnet new sourcegen -n XamlAutomation -slnx
2. Introduced the option to include a reference to the PolySharp NuGet package.
-ips | --include-polysharp - Default value is false
dotnet new sourcegen -n XamlAutomation -ips
Note: These options may also be combined.
v1.0.1:
Package versions have been made dynamic to pull the latest stable version.
v1.0.0:
Initial release of Common CLI Templates and it covers Source Generator project template.
Usage:
dotnet new sourcegen -n XamlAutomation
dotnet new sourcegen -n XamlAutomation -inc