question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to update global tool to the latest prerelease version

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
peterhuenecommented, Sep 25, 2018

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 a PackageReference. If we had that, I would expect a --prerelease option for dotnet 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 not dotnet tool update, which supports different options obviously. We should fix the error message because I don’t see tool 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.

0reactions
wli3commented, Sep 29, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found