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.

Unlisted packages are still installed via `dotnet tool install` without `--version` despite correctly not showing up in `dotnet tool search`

See original GitHub issue

Describe the bug

A tool that was incorrectly versioned was pushed to NuGet.org and had to be unlisted. The version is correctly hidden from searches both via nuget.org and via dotnet tool search but dotnet tool install seems to ignore this and just locate the version via the provided v3-flatcontainer list image

I can vaguely get on board with argument that if there are dependencies on that version then it shouldn’t break them by being completely inacessable, but shouldn’t that really only apply in that case if that specific version is requested via --version rather than by default? What’s the point of hiding it in the search if its still the one that is installed by default, that feels a little unexpected for the end user and potentially less safe.

It’s worth noting this also existed and since been fixed in NuGet.exe

To Reproduce

  1. Publish two versions of a tool to nuget.org
  2. Unlist the latest version
  3. Run dotnet tool search <TOOLNAME> and validate that the unlisted version does not show up
  4. run dotnet tool install --global <TOOLNAME> Result The later but, unlisted version is installed Expected The latest listed result is installed

Further technical details

This can be reproduced through the dotnet sdk container

> run --rm -it mcr.microsoft.com/dotnet/sdk:6.0 bash
> dotnet tool install --global Octopus.DotNet.Cli

using dotnet version 6.0.200

Update: 25 Feb I have since had to contact the NuGet team directly to get the package properly “deleted” so the specific package in this example is no longer a problem but the fundamental issue still remains.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
JiaqiWang18commented, Nov 28, 2022
1reaction
clairernovotnycommented, Feb 24, 2022

We should ensure the semantics for this are the same as dotnet nuget add ...

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot .NET tool usage issues
Discover the common issues when running .NET tools and possible solutions.
Read more >
dotnet tool update not getting latest version in nuget
I have to force a cache clear to get it to take the latest one. dotnet nuget locals http-cache -c. I previously installed...
Read more >
dotnet tool install command - .NET CLI
The dotnet tool install command installs the specified .NET tool on your machine.
Read more >
Cannot install dotnet-ef tool on Windows 10
I got it working by adding the --version flag and specifying the version to 3.0.0 . The command that I used: dotnet tool...
Read more >
Dotnet fails to install tools - Microsoft Q&A
I'm using Windows 10, same results with both a bash shell and a DOS command line. .NET Core v3.1 appears to be installed...
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