Multiple global tool versions installed with unexpected behaviours thereafter
See original GitHub issueSteps to reproduce
I honestly don’t know how I or dotnet tool install -g
got me here 😕 but I have two version of dotnet-try
installed:
PS> dotnet tool list -g
Package Id Version Commands
------------------------------------------------------------------------------------
amazon.lambda.testtool-2.1 0.9.2 dotnet-lambda-test-tool-2.1
amazon.lambda.tools 3.2.3 dotnet-lambda
benchmarkdotnet.tool 0.11.5 dotnet-benchmark
coverlet.console 1.5.1 coverlet
csharpminifierconsole 1.0.2 csmin
csharpsyntaxvalidator 1.1.0 csval
dotnet-ignore 1.0.4 dotnet-ignore
dotnet-nuget-gc 0.1.12 dotnet-nuget-gc
dotnet-outdated 2.2.0 dotnet-outdated
dotnet-reportgenerator-globaltool 4.1.5 reportgenerator
dotnet-script 0.29.0 dotnet-script
dotnet-symbol 1.0.3 dotnet-symbol
dotnet-t4 2.0.4 t4
dotnet-try 1.0.19264.11 dotnet-try
dotnet-try 1.0.19266.17 dotnet-try
dotnet-warp 1.0.9 dotnet-warp
dotnetsay 2.1.4 dotnetsay
dotnetthx 0.1.2 dotnet-thx
elemental.sysinfotool 0.5.0 sysinfo
git-istage 0.2.61 git-istage
git-rocket-filter 1.0.1 git-rocket-filter
git-status-cli 1.0.0 git-status
nyancat 1.1.0 nyancat
recolor 2.4.0 recolor
sourcelink 3.0.0 sourcelink
However, when I try to update, I get an error:
PS> dotnet tool update -g dotnet-try
Tool 'dotnet-try' has multiple versions installed and cannot be updated.
And the same happen when trying to uninstall:
PS> dotnet tool uninstall -g dotnet-try
Tool 'dotnet-try' has multiple versions installed and cannot be uninstalled.
When I look at the help for uninstall
, I do not see a way to uninstall a specific version:
Usage: dotnet tool uninstall [options] <PACKAGE_ID>
Arguments:
<PACKAGE_ID> The NuGet Package Id of the tool to uninstall.
Options:
-g, --global Uninstall the tool from the current user's tools directory.
--tool-path <PATH> The directory containing the tool to uninstall.
-h, --help Show command line help.
Interestingly, I can still run dotnet-try
and when I do with its --version
switch, I see that it’s running the older version (1.0.19264.11 < 1.0.19266.17):
PS> dotnet try --version
1.0.26411+32b271139a2df7175d00a808cca2b85c59504b70
Expected behavior
Expected one of the following:
- latest version of the tool to run
install
should have never let me get into this situation in the first placeuninstall
should uninstall all versionsuninstall
should have a--version
flag
Actual behavior
- Impossible to update
- Impossible to uninstall
- Older version of tool is run
Environment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.2.204
Commit: 8757db13ec
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.204\
Host (useful for support):
Version: 2.2.5
Commit: 0a3c9209c0
.NET Core SDKs installed:
1.1.13 [C:\Program Files\dotnet\sdk]
1.1.14 [C:\Program Files\dotnet\sdk]
2.1.101 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.104 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
2.1.400 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
2.1.403 [C:\Program Files\dotnet\sdk]
2.1.500 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.1.505 [C:\Program Files\dotnet\sdk]
2.1.507 [C:\Program Files\dotnet\sdk]
2.1.602 [C:\Program Files\dotnet\sdk]
2.1.604 [C:\Program Files\dotnet\sdk]
2.2.101 [C:\Program Files\dotnet\sdk]
2.2.202 [C:\Program Files\dotnet\sdk]
2.2.204 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Fixing .NET Core tool update issues
As a local tool (from version 3.0 and up) In this case I am using the default, so a global tool. Updating .NET...
Read more >Breaking changes included in EF Core 3.x
The EF Core command-line tool, dotnet ef, is no longer part of the . ... This behavior can result in unexpected and potentially...
Read more >Fix List for Db2 Version 11.1 for Linux, UNIX and Windows
Fix List for Db2 Version 11.1 for Linux, UNIX and Windows ... IN CHECK_CREATE() WHEN RUNNING DB2LOOK IF AN OBJECT GETS DROPPED WHILE...
Read more >hgrc
This section specifies merge tools to associate with particular file patterns. Tools matched here will take precedence over the default merge tool. Patterns...
Read more >Changelog | Cypress Documentation
Fixed unexpected behaviors when verifying a cookie was not returned from cy. ... Fixed a 9.x to 10.x migration bug where the migration...
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 Free
Top 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
Same issue on dotnet-sdk-preview 7.0.100-rc.2.22477.23
@wli3 can you investigate?