I post allot about the good that are Project Templates. Seems only fitting for me to blog about a new extension from Mads Kristensen that will make it much easier for you (and I) to create those templates!
Makes it easy to create custom project templates for ‘dotnet new’ and Visual Studio.
See the change log for changes and road map.
Read more about the new template format here and how to create and customize your templates. This extension makes it easy to get started, but you need to understand how the underlying templating system works to take full advantage of it.
- Generate template file
- Add Visual Studio host file
- Add .NET CLI host file
Generate template file
Right-click the project you want to turn into a template and click Create Template….
That will create a folder called .template.config and add a file called template.json to it. The folder is not being added to the project, but exist on disk in the root of the project directory.
Add Visual Studio/.NET CLI host files
To have the template show up in the ASP.NET project dialog, you need to add a Visual Studio specific host file to the .template.config folder.
And it wouldn’t be a Mads project if it wasn’t open source… madskristensen/TemplateCreator