`dotnet new --uninstall` not working for folder templates
See original GitHub issue[Migrating from dotnet/core#893 per tweets with @sayedihashimi]
Unable to uninstall folder-based templates
This could be an issue with the dotnet net --uninstall
(or dotnet new -u
) command, or just an issue with uninstall documentation, but it doesn’t seem possible to uninstall a template via a folder template.
See also this Stack Overflow question.
General
Steps
-
Create template folder (.template.config folder with a template.json file)
I have confirmed it with this JSON config.
{ "$schema": "http://json.schemastore.org/template", "author": "Some Author", "classifications": [ "Some", "Various", "Search Keywords" ], "identity": "Some.Identity", "shortName": "name-used-in-dotnetnew", "name": "Some Template Name" }
-
dotnet new --install ./some-template-folder/
-
[optional] Use newly-installed template
The template "Some Template Name" was created successfully.
-
Attempt to uninstall template
dotnet new --uninstall ./some-template-folder/
Instead of uninstalling, I keep getting this error message.
Could not find something to uninstall called '.\some-template-folder\'.
This happened with .NET Core SDK v1.1.0 and v2.0.0.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Unable to uninstall `dotnet new` via folder template?
This successfully puts the template in place for use with dotnet new {shortName} . The template "Some Template Name" was created successfully.
Read more >dotnet new uninstall - .NET CLI
The dotnet new uninstall command uninstalls a template package.
Read more >Custom templates for dotnet new - .NET CLI
Use the dotnet new uninstall command to uninstall a template package. If the package was installed by either a NuGet feed or by...
Read more >Install and manage SDK templates - .NET
Uninstall template package. Template packages are uninstalled through the dotnet new uninstall SDK command. You can either provide the NuGet ...
Read more >Create an item template for dotnet new - .NET CLI
Uninstall the template In your terminal, navigate to the extensions folder and run the following command to uninstall the templates located at ...
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
@patridge - I believe you have discovered a bug. Could you try uninstalling one more time, using the full path, but without a trailing slash:
dotnet new --uninstall "C:\full\path\to\some-template-folder"
Could you also let me know the output from running
dotnet --version
?I filed a PR for clarifying this in the docs here: dotnet/docs#3054, regardless of any internal changes required.