Closed msallin closed 5 years ago
You have the same groupIdentity for both templates, so it will only be listed once.
GroupIdentity serves as a rollup to group together templates which are semantically the same template, but may have different symbols to differentiate. For example, the templates contained in the following template packs, all have the same groupIdentity, but each one has a distinct id and only supports one version of netcoreapp via the Framework symbol each one defines.
Microsoft.DotNet.Web.ProjectTemplates.2.2 Microsoft.DotNet.Web.ProjectTemplates.2.1 Microsoft.DotNet.Web.ProjectTemplates.2.0
You can either add something to allow the template engine to disambiguate your templates from each other, set the groupIdentity to something unique between them if they are really distinct templates, or remove the groupIdentity entirely.
Problem
I want to create a template pack, containing multiple templates. I followed the approach documented here: https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates When I install the resulting NuGet-Package, I get the following behavior.
1)
dotnet new
shows only one template ("Test.1") butdotnet new -u
shows both ("Test.1" and "Test.2" from "AdatumCorporation.Utility.Templates"). 2) It is not possible to create a template using the short name with the fullnamedotnet new Test.1
it works.Repro
I've the following directory structure. The content of MyDotnetTemplates.csproj is the same as on https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates. The content of template.json is the following.
dotnet --info