dotnet / dotnet-template-samples

Samples showing how to create templates using the Template Engine for dotnet new and Visual Studio

Home Page:https://docs.microsoft.com/dotnet/articles/core/tools/dotnet-new

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Packaging templates as a nupkg

pierceboggan opened this issue · comments

I'm not aware of any documentation and/or samples on how to package up a group of templates as a nupkg (though we do have documentation on actually installing from a nupkg in the dotnet/templating README).

Let me chat with @mlorbetske on this one. On windows you can use nuget.exe to package a nuget package with a .nuspec. For xplat support I think it gets much more complicated to produce that package.

From @mlorbetske I have heard that @mhutch may have something that we can use to create nuget packages in a cross platform friendly way.

Yep you can use NuGetizer.

Here's an example: https://gist.github.com/mhutch/075c97186d3f709bbc79213c68a46b7e

Just build the Pack target or set the PackOnBuild property to true.