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

VS; Running the restore command when Restore is disabled displays a confusing message #5659

Closed
tmat opened this issue Jul 27, 2017 · 6 comments
Assignees
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:Restore Type:Bug
Milestone

Comments

@tmat
Copy link

tmat commented Jul 27, 2017

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): VS UI

VS version (if appropriate): 15.3.0 Preview 6 (26725.2.d14rel)

OS version (i.e. win10 v1607 (14393.321)): 10.0.15063

Detailed repro steps so we can see the same problem

  1. Disable auto-restore in VS options:

image

  1. Create a new .NET Core Lib.

As expected, a few errors are reported:
"The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)"

  1. Run command "Restore NuGet packages" from Solution context menu

Packages are not restored, above errors are still displayed.

Package Manager output window claims all is restored:

All packages are already installed and there is nothing to restore.
Time Elapsed: 00:00:00.0067942
========== Finished ==========

Edit [nikolev]

This is the expected behavior of restore, but the message is confusing.
The message should at least be updated.

@tmat
Copy link
Author

tmat commented Jul 27, 2017

/cc @srivatsn

@mishra14
Copy link
Contributor

mishra14 commented Jul 27, 2017

cc: @nkolev92 @emgarten

@jainaashish
Copy link
Contributor

@tmat this option doesn't disable auto-restore instead it disables restore itself, so what ever you're seeing is the right behavior. We don't have any option to only disable auto-restore as of now.

@tmat
Copy link
Author

tmat commented Jul 27, 2017

@jainaashish I see. Then either "Restore NuGet packages" should show a message that nuget package restore is disabled, or override the setting.

@nkolev92 nkolev92 changed the title VS; Restoring packages doesn't work if auto-restore is disabled VS; Running the restore command when Restore is disabled displays a confusing message Jul 27, 2017
@nkolev92
Copy link
Member

@tmat
I've updated the original issue/name.
Thanks for creating this.

@nkolev92 nkolev92 added this to the 4.4 milestone Jul 27, 2017
@zhili1208 zhili1208 self-assigned this Aug 7, 2017
@rrelyea rrelyea added Type:Bug Area:ErrorHandling warnings and errors/log messages & related error codes. labels Aug 7, 2017
@zhili1208
Copy link
Contributor

Fixed in NuGet/NuGet.Client@e02233b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:Restore Type:Bug
Projects
None yet
Development

No branches or pull requests

6 participants