Skip to content

Seekatar/dotnet-new-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample .NET Template

File Template

Install the sample template

cd working/templates/extensions
dotnet new -i ./

Uninstall the sample template by using dotnet new -u and finding the command to uninstall it.

dotnet new -u | sls 'dotnet new.*working\\templates\\extensions'

Project Template

Install the sample template

cd working/templates/consoleasync
ri bin,obj -r
dotnet new -i ./

Uninstall the sample template by using dotnet new -u and finding the command to uninstall it.

dotnet new -u | sls 'dotnet new.*working\\templates\\console'

Packing

cd working # above the two template folders
dotnet new console -n templatepack -o .

Edit the csproj per tutorial to create a nupkg and don't compile the code, but include it in the nupkg.

Build it and register it

cd working
dotnet pack
# pack will output fqdn of nupkg
dotnet new -i C:\code\dotnet-new-template\working\bin\Debug\AdatumCorporation.Utility.Templates.1.0.0.nupkg

Use it

dotnet new consoleasync -o Test -c Widget -l test

Uninstall it

dotnet new -u | sls 'dotnet new.*AdatumCorp'

https://weblog.west-wind.com/posts/2020/Oct/05/Creating-a-dotnet-new-Project-Template

dotnet new test -h

VS Framework parameter name special Other parameters new extra step to prompt in VS

About

.NET 5 Project Template for dotnet new

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published