Unable to update global tool to the latest prerelease version
See original GitHub issueI tried updating to the latest prerelease version of the dotnet-httprepl tool, but there doesn’t appear to be a way to do so using the update command:
C:\>dotnet tool update -g --add-source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json dotnet-httprepl
error NU1103: Unable to find a stable package dotnet-httprepl with version
error NU1103: - Found 9 version(s) in dotnet-core [ Nearest version: 2.2.0-preview3-35304 ]
error NU1103: - Found 1 version(s) in nuget.org [ Nearest version: 2.2.0-preview2-35157 ]
error NU1103: - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error NU1103: - Found 0 version(s) in C:\Program Files\dotnet\sdk\NuGetFallbackFolder
error NU1103: - Found 0 version(s) in blazor-dev
Tool 'dotnet-httprepl' failed to update due to the following:
The tool package could not be restored.
Tool 'dotnet-httprepl' failed to install. This failure may have been caused by:
* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
Notice that the message recommends using the --version
option, which doesn’t appear to be supported with update
:
C:\>dotnet tool update -g --version 2.2.0-* --add-source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json dotnet-httprepl
Unrecognized command or argument '2.2.0-*'
Unrecognized command or argument 'dotnet-httprepl'
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:8 (7 by maintainers)
Top Results From Across the Web
dotnet tool update command - .NET CLI
The dotnet tool update command provides a way for you to update .NET tools on your machine to the latest stable version of...
Read more >Using global tool "dotnet outdated" to check for the latest ...
Using global tool. The output shows each NuGet package, the current version used and the latest version. You have an option to pass...
Read more >Update .NET Core Tools - visual studio 2019
I tried to install everything on a new Windows installation on another laptop and I immediately chose .NET Core 3.1, no other .NET...
Read more >dotnet core 3.0 unable to locate the dotnetcore sdk when ...
In general latest dotnet sdk tools are used so no global.json is needed. So if you want to controll which version of cli...
Read more >dotnet-tool-install: Installs the specified .NET tool on ...
To install a global tool in a custom location, use the --tool-path option. To install a local tool, omit the --global and --tool-path...
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
I think
dotnet tool update
doesn’t support a--version
option currently because there’s no wildcard that will get us the “latest version including prerelease” we can use for aPackageReference
. If we had that, I would expect a--prerelease
option fordotnet tool update
rather than a--version
option, since the intent of the tool is not to install a particular version or range, but rather update to latest known (with or without considering prerelease versions).The bug here, however, is that the help text printed is for
dotnet tool install
and notdotnet tool update
, which supports different options obviously. We should fix the error message because I don’t seetool update
supporting--version
.Until we add support for a
--prerelease
option, the workaround for the scenario would have to be to uninstall the tool and reinstall the particular desired version.fixed in https://github.com/dotnet/sdk/pull/19646