Core: `dotnet new --uninstall` not working for folder templates

Created on 24 Aug 2017  路  2Comments  路  Source: dotnet/core

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

  1. 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"
    }
    
  2. Install template

    dotnet new --install ./some-template-folder/
    
  3. [optional] Use newly-installed template

    The template "Some Template Name" was created successfully.
    
  4. 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.

Most helpful comment

dotnet new --debug:reinit

All 2 comments

[Migrated to dotnet/templating#1226 and closing this one, per [tweets with @sayedihashimi](https://twitter.com/sayedihashimi/status/901533518957694976)]

dotnet new --debug:reinit

Was this page helpful?
0 / 5 - 0 ratings