dotnet new my-template does not create output files
See original GitHub issueI am trying to create a template for some dotnet/react based boilerplate: https://www.nuget.org/packages/JBuschke.Glue.Starter/. After installing via dotnet new -i JBuschke.Glue.Starter::*
and running dotnet new gluestarter
(the templates short name), no output files are created. Only some help output, the projects description and author are logged to the console:
dotnet new gluestarter
Usage: new [options]
Options:
-h, --help Displays help for this command.
-l, --list Lists templates containing the specified name. If no name is specified, lists all templates.
-n, --name The name for the output being created. If no name is specified, the name of the current directory is used.
-o, --output Location to place the generated output.
-i, --install Installs a source or a template pack.
-u, --uninstall Uninstalls a source or a template pack.
--nuget-source Specifies a NuGet source to use during install.
--type Filters templates based on available types. Predefined values are "project", "item" or "other".
--dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation.
--force Forces content to be generated even if it would change existing files.
-lang, --language Filters templates based on language and specifies the language of the template to create.
Opinionated ASP.NET Core + React boilerplate (C#)
Author: Jannik Buschke
(No Parameters)
the template.json:
{
"$schema": "http://json.schemastore.org/template",
"author": "Jannik Buschke",
"classifications": ["AspNetCore", "React"],
"groupIdentity": "JBuschke",
"identity": "JBuschke.Glue.Starter",
"name": "Opinionated ASP.NET Core + React boilerplate",
"shortName": "gluestarter",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "TemplateName",
"preferNameDirectory": false
}
the nuspec file:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>JBuschke.Glue.Starter</id>
<version>0.9.3</version>
<description>
Opinionated Asp .Net Core + React template
https://github.com/jannikbuschke/glue-reactnetcore-template
</description>
<authors>Jannik Buschke</authors>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
</package>
The cached packages ~\.templateengine\dotnetcli\v2.2.104\packages\jbuschke.glue.starter.0.9.2.nupkg\
content looks alright to me:
/JBuschke.Glue.Starter.nuspec
/content/.template.config/template.json
/content/<template-files>
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Custom templates for dotnet new - .NET CLI
Learn about custom templates for any type of .NET project or files.
Read more >Create an item template for dotnet new - .NET CLI
Learn how to create an item template for the dotnet new command. Item templates can contain any number of files.
Read more >dotnet new <TEMPLATE> - .NET CLI
The dotnet new command creates new .NET projects based on the specified template.
Read more >Create a project template for dotnet new - .NET
In this tutorial, your template folder is located at working\templates\consoleasync. When you create a template, all files and folders in the ...
Read more >Create a template package for dotnet new - .NET
With .NET, you can create and deploy templates that generate projects, files, and even resources. This tutorial is part three of a series ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My problem was that I had two templates with the same “groupIdentity”.
The weird thing is, the template actually seems to work.
correctly initializes the project.
However I have a second template (different content, different id)
JBuschke.AspCra
which if installed causes both templates to fail (no output for both).If I only install one of them it works.