-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a clearer error message when dotnet-install-tool fails because of incorrect package type #9122
Comments
One of the decision is let nuget error pass through and cli will not do further "translation". @KathleenDollard @peterhuene @livarcocc in this case we should ask nuget to have better error message do you agree? |
We had some internal discussion of this, and decided that failing to pass the NuGet message through crippled certain debugging scenarios. Specifically, if a package can't be found, knowing which package is to found is helpful. Yes, it is painful here and it is going to be an easy mistake to make. Let's take another quick look at this |
Thanks! I feel that dotnet.exe is quickly becoming (and should be considered) a first line "User Interface" so I'd love to see less logging and stack traces and more "pit of success" messages. And just like we do 301 redirects for URLs to make sure there's a canonical one, for fundamental packages like this that move or rename, we want to make sure that the end result is that the user has the commands available to them. For me, that meant removing the old CliTool from the csproj manually, and then manually installing the new dotnet-watch package (which I understand will become global automatically (?) in preview2. |
For reference, here's what's currently displayed for preview2 (master):
Still using the same error coming from NuGet which is not clear, but the format is a little less verbose. I'd love to see us at least remove the project file out of the error message. |
I've filed dotnet/cli#8707 to at least remove the temp project from the error message since it is entirely unhelpful and only contributes to a worse diagnostic experience. We'll file an issue with NuGet to see if we can improve the underlying error message when requested package type isn't a "tool". |
I have filed NuGet/Home#6630 to work on the text. Without that fix from NuGet and with dotnet/cli#8707, the experience would be
With my suggestion for the NuGet fix (open for better language, please comment in the NuGet issue)
@natemcmaster and others: Do you think this solves this problem? |
Yeah, I think that would work. |
@livarcocc Do we need this held open? The NuGet issue Kathleen opened is where the real fix needs to happen and dotnet/cli#8707 has already been fixed. |
Now that the other clean-up work is in for the tool install UX, I'm going to close this issue in favor of NuGet/Home#6630 that is the remaining piece of the puzzle (a clearer message that the package that was found was not a tool package and cannot be installed with Please re-open this issue if you feel like Kathleen's suggested fix above is an insufficient UX. Thanks! |
Steps to reproduce
dotnet install tool Microsoft.Dotnet.Watcher.Tools -g
Expected behavior
A message that explains the package clearly what is wrong. Maybe:
Actual behavior
You get a wall of text. The error message does not clearly indicate what went wrong.
The error message is
I don't think this error makes it clear to users why the package could not be installed.
Environment data
dotnet --version
: 2.1.300-preview1-008174cc @wli3 @KathleenDollard @shanselman
cref aspnet/DotNetTools#399 and aspnet/Announcements#290 (comment)
The text was updated successfully, but these errors were encountered: