/simple-NuGet-template

Here is an example for NuGet template creation, see article https://itnext.io/how-to-create-a-template-in-net-for-a-c-application-and-what-nuget-is-for-e5d4fc03c487

Primary LanguageC#Apache License 2.0Apache-2.0

simple-NuGet-template

Here is an example for NuGet template creation, see article How to create a template in .NET for a C# application and what NuGet is for

To create template open the command line and execute the following commands:

C:\nuget.exe pack C:\Temp\SuperApp\SuperApp.ConsoleTemplate.CSharp.nuspec -OutputDirectory C:\Temp

dotnet new --install C:\Temp\SuperApp.ConsoleTemplate.CSharp.0.0.1.nupkg

dotnet new shwa -o C:\Temp\MyApp

cd C:\Temp\MyApp

dotnet run

image

image

image

So, what we did with these commands?

we packed the template to NuGet package by the instructions provided in the .nuspec file then we installed the template from the NuGet package to the dotnet, we need to check it works we created an application from the newly installed template then we ran it to check that it works lastly, we see that console output, the folder and application renamed to the new name we provided in the command