Question on dotnet uninstall
See original GitHub issueI think I have a misunderstanding on how -u|-uninstall
works (or perhaps there’s a list refresh that I’m missing for an uninstalled template).
For testing purposes I created a few file system test templates, such as this one for Giraffe4.Template
/giraffe4
…
{
"identity": "Giraffe4.Template",
"author": "guardrex",
"classifications": [ "Web", "Giraffe", "blah" ],
"name": "Giraffe Web App4",
"tags": {
"language": "F#"
},
"shortName": "giraffe4",
"sourceName": "_AppName"
}
Install works fine …
dotnet new -i c:\template4
However, uninstall doesn’t want to remove the template. I’ve tried the following two commands …
dotnet new -u Giraffe4.Template
dotnet new -u giraffe4
… but the template persists in the list …
dotnet --info
:
.NET Command Line Tools (2.0.0-preview2-006349)
Product Information:
Version: 2.0.0-preview2-006349
Commit SHA-1 hash: 30a0bc3028
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0-preview2-006349\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview2-25406-03
Build : baa69770c40ce13dcb1a8979b288be8cb23f9c7b
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (15 by maintainers)
Top Results From Across the Web
How do i uninstall 2021-12 .NET 6.0.1
How can we uninstall dotnet6 installed through "Windows Hosting Bundle Installer" from windows server(not on local) on PROD without ...
Read more >dotnet-core-uninstall not working from command line
1 Answer. dotnet-core-uninstall is a separate experimental tool, not part of the . NET Core SDK. You need to download from its Github...
Read more >How to uninstall dotnet from Ubuntu 20.10 completely?
Try with major and minor version only: sudo apt remove --purge dotnet-sdk-6.0 sudo apt remove --purge dotnet-runtime-6.0.
Read more >What happens when I uninstall .Net Core 3.1?
What happens when I uninstall .Net Core 3.1? Looks like Ivanti also acknowledges that .Net Core 3.1 beeing out of support is no...
Read more >Uninstall .NET Core SDK older versions
I've got many versions of .NET Core SDK installed in my Windows 10 PC. I'm wondering if older versions can be uninstalled:.
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
@seancpeters I had to delete my last message, because I was still in the process of wrapping my brain around it: It turns out that one installs from a nupkg on disk (locally) (never from a nuspec) but then uninstalls by just providing the package name as you said earlier.
So if the user installs with …
they uninstall with …
Going back to an earlier post, I think it would be far simpler if uninstall was merely based on giving the
shortName
to the command …… and let the ✨ .NET magic ✨ figure out where/what to uninstall, even if it only meant delisting the template (i.e., when the template itself is no longer on disk or a template at nuget.org doesn’t exist/can’t be found).
I think that I have what I need to get the 1st draft of this topic out, which relies heavily on the Wiki and @sayedihashimi’s blog post to cover the deeper/finer points. Is it ok if I ping you on the PR to take a 👀 look at it?
Hi @GuardRex, Uninstall is currently driven by the location the template was installed from. Since giraffe4 was installed using:
dotnet new -i c:\template4
you’ll be able to uninstall it using the same path:dotnet new -u c:\template4
Please let us know if that works for you.