Skip to content
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

dotnet add package command does not provide helpful message if no stable version is available. #4922

Open
mishra14 opened this issue Mar 28, 2017 · 5 comments
Labels
Category:Quality Week Issues that should be considered for quality week Platform:Xplat Priority:2 Issues for the current backlog. Style:PackageReference Type:Bug
Milestone

Comments

@mishra14
Copy link
Contributor

more info: #4918

@mishra14 mishra14 self-assigned this Mar 28, 2017
@mishra14 mishra14 added this to the 4.3 milestone Mar 29, 2017
@mishra14 mishra14 changed the title dotnet add package command does not provide helpful message if no no stable version is available. dotnet add package command does not provide helpful message if no stable version is available. May 3, 2017
@mishra14
Copy link
Contributor Author

mishra14 commented May 3, 2017

This is blocked by the fact that restore does not respond with an error code indicating the type of failure. But once the work at https://github.com/NuGet/Client.Engineering/issues/32 is done (in this sprint or next), we can throw a better error to the user.

@mishra14
Copy link
Contributor Author

We have improved the restore logging to display a better message -

F:\validation\test> dotnetlocal add package alexa.net
Microsoft (R) Build Engine version 15.2.93.5465
Copyright (C) Microsoft Corporation. All rights reserved.

  Writing C:\Users\anmishr\AppData\Local\Temp\tmpA603.tmp
info : Adding PackageReference for package 'alexa.net' into project 'F:\validation\test\test.csproj'.
log  : Restoring packages for F:\validation\test\test.csproj...
info :   GET https://dev.nugettest.org/api/v2/FindPackagesById()?id='alexa.net'
info :   GET https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/alexa.net/index.json
info :   GET https://api.nuget.org/v3-flatcontainer/alexa.net/index.json
info :   NotFound https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/alexa.net/index.json 120ms
info :   GET https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/system.missing/index.json
info :   GET https://api.nuget.org/v3-flatcontainer/system.missing/index.json
info :   GET https://dev.nugettest.org/api/v2/FindPackagesById()?id='System.Missing'
info :   NotFound https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/system.missing/index.json 23ms
info :   OK https://api.nuget.org/v3-flatcontainer/alexa.net/index.json 296ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/system.missing/index.json 244ms
info :   OK https://dev.nugettest.org/api/v2/FindPackagesById()?id='alexa.net' 677ms
info :   OK https://dev.nugettest.org/api/v2/FindPackagesById()?id='System.Missing' 3276ms
error: Unable to find a stable package alexa.net with version
error:   - Found 8 version(s) in nuget.org [ Nearest version: 1.0.0-beta-1 ]
error:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error:   - Found 0 version(s) in devtest
error:   - Found 0 version(s) in dotnet-core
error: Unable to find package System.Missing. No packages exist with this id in source(s): devtest, dotnet-core, Microsoft Visual Studio Offline Packages, nuget.org
error: Package 'alexa.net' is incompatible with 'all' frameworks in project 'F:\validation\test\test.csproj'.

Once this work is done, we can improve the logs for dotnet add package.

@rrelyea
Copy link
Contributor

rrelyea commented Jun 14, 2017

@mishra14 - this could be done now?

@mishra14 mishra14 added the Product:NuGet.exe NuGet.exe label Jun 14, 2017
@mishra14
Copy link
Contributor Author

Discussed the best course of action offline:

  1. Current scenario has improved from when the bug was created because now restore displays a meaningful warning -
error: Unable to find a stable package alexa.net with version
error:   - Found 8 version(s) in nuget.org [ Nearest version: 1.0.0-beta-1 ]
error:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error:   - Found 0 version(s) in devtest
error:   - Found 0 version(s) in dotnet-core
  1. Next step would be to increase the restore verbosity level to Warning so only warnings and errors are displayed.

  2. Last step would be to hide all restore logs from the user and then on restore completion look for warnings and error codes and then wrap around with more meaningful messages in the context of add package command.

@mishra14 mishra14 modified the milestones: 4.4, 4.3 Jun 14, 2017
@mishra14 mishra14 modified the milestones: Backlog, 4.4 Sep 1, 2017
@mishra14 mishra14 added the Priority:2 Issues for the current backlog. label Sep 1, 2017
@mishra14 mishra14 removed their assignment Aug 13, 2018
@ghost ghost added the Status:Inactive Icebox issues not updated for a specific long time label Sep 1, 2022
@nkolev92 nkolev92 added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Priority:2 Issues for the current backlog. labels Apr 3, 2023
@nkolev92 nkolev92 added Priority:2 Issues for the current backlog. and removed Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Status:Inactive Icebox issues not updated for a specific long time Status:Excluded from icebox cleanup labels Apr 22, 2024
@nkolev92 nkolev92 added the Category:Quality Week Issues that should be considered for quality week label Apr 22, 2024
Copy link
Contributor

Issue is missing Type label, remember to add a Type label

@dotnet-policy-service dotnet-policy-service bot added the missing-required-type The required type label is missing. label Apr 23, 2024
@zivkan zivkan added the Type:Bug label Jun 2, 2024
@dotnet-policy-service dotnet-policy-service bot removed the missing-required-type The required type label is missing. label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Platform:Xplat Priority:2 Issues for the current backlog. Style:PackageReference Type:Bug
Projects
None yet
Development

No branches or pull requests

6 participants