-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to uninstall template #4156
Comments
@sayedihashimi could you please try to recall the command you installed the template with? (and path you used - it might matter) I see that uninstall command is not correct in -u output - it should contain absolute path to folder. Subsequent issues may be caused by that. I assume that you installed nupkg and not the folder. But due to folder with same name exists in this working folder, it tries to uninstall the folder package, not the nupkg, and fails due to folder is not installed. To prove assumption, just try to execute the uninstall command from different folder. It's a bug anyway, and I'll fix it, but it's very special case. |
@vlada-shubina you were correct, I changed directories and the uninstall command worked. Here is the output. C:\temp> dotnet new --uninstall sayedha.templates
Success: sayedha.templates::1.0.5 was uninstalled. What a strange bug, definitely would never have figured that out on my own. Do you think we'll be able to fix this or is this something that template authors will need to learn? |
yes, it is possible to fix it; I will keep it open. |
Sounds good thanks. I'll add some note in about this in my doc. |
I'm trying to uninstall a template, but keep getting an error that the folder isn't found. The folder does exist, but there must be some issue with the template engine that doesn't like it for some reason.
Here is what I'm doing.
dotnet new -u
to get uninstall commandExpected: template to be uninstalled
Actual:
What can I do to diagnose this? I tried
dotnet new --debug:reinit
but that seems to no longer work. Is there some built-in command that can be used to resetdotnet new
to the install state? That's super handy for template developers.Here is a gif
.
The text was updated successfully, but these errors were encountered: