dotnet new Template Creator

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!

Template Creator

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.

Features

  • 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….

image

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.

… [Click through to download it]

And it wouldn’t be a Mads project if it wasn’t open source… madskristensen/TemplateCreator



from Channel 9 https://channel9.msdn.com/coding4fun/blog/dotnet-new-Template-Creator

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s