Reputation: 95
I have VS 2022
with dotnet 6. I want to create custom project templates.
XYZ
,Upvotes: 2
Views: 2386
Reputation: 9953
There is a comprehensive documentation for creating a custom template. Here is the steps for packageing:
A custom template is packed with the
dotnet
pack command and a.csproj
file. Alternatively, NuGet can be used with thenuget
pack command along with a.nuspec
file. However, NuGet requires the .NET Framework on Windows and Mono on Linux and macOS.
The .csproj
file is slightly different from a traditional code-project .csproj
file. Note the following settings:
See this for a working example.
Upvotes: 3