-
Notifications
You must be signed in to change notification settings - Fork 253
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
NuGet.exe restore has a misleading message about the MSBuild versions supported. #8958
Comments
Thanks for pointing out this problem, @eriawan
Also, we're open to accept a PR for making this message better. |
@dominoFire For example, if I run this on machine that has VS 2019 16.4.x installed with VS 2019 Developer Command Prompt:
I should get this error:
What do you think? |
NuGet will try to work with pretty much any msbuild version, the challenges is the capabilities that'll be enabled. In practice, it's best to match NuGet to match the MSBuild version that ships around the same time. Given a Visual Studio/MSBuild version of x.y.z equation is something like So 5.4 of NuGet is best used with 16.4 of MSBuild. Per this, I'm retitling and repurposing this for improving the message. |
@nkolev92 |
We either remove the version list or try to be smarter about autogenerating it. @eriawan Given that this is merely a string change, it's not super high on our bug list. @NuGet/nuget-client Any ideas about what the string should be? You can always create a PR changing the string, then we'll get someone from the team to help drive closure. |
Hit the same exact issue today running NuGet CLI v 6.2.0.146
|
@nkolev92 I understand it's not the most-urgent, but would be nice to get fixed. Right now this Github issue is among the top search results for this problem :) If you have already figured out the appropriate wording, can you please release the fix? |
Hey @obohaciak We don't really have a proposal for the wording here. Basically, thinking in terms of what version of NuGet supports which verison of MSBuild is probably not the question, but rather what version of MSBuild can build your project. NuGet occasionally uses features of newer msbuild, and usually the recommended way is matching NuGet to msbuild in a: MajorMSBuildVersion-11.MinorMsBuildVersion fashion. So if NuGet.exe is 6.2, use 17.2 of MSBuild and vice versa. |
What about my previous wording proposal?
|
@eriawan The supported versions listed part is weirder, that I'd almost prefer if they weren't listed in an exhaustive fashion. I think that'd address all concerns brought up in this issue. |
Details about Problem
NuGet product used: NuGet.exe :
NuGet version (x.x.x.xxx): tested on 5.3.1.6268 and 5.2.0.6090
VS version (if appropriate): VS 2019 16.4.1 and VS 2019 16.3.5
OS version: Win10 v1909 build 18363.535
Worked before? N/A
NOTE:
nuget restore -h shows this:
Detailed repro steps so we can see the same problem
...
Suggestions
The value of 16.0 should refer to the version of the VS 2019 MSBUILD , or please update the option of -MSBuildVersion to use the exact version of VS 2019, such as 16.4 for VS 2019 16.4.x. Otherwise it is confusing in the beginning.
Verbose Logs
Cannot have verbose logs, because nuget.exe failed to run immediately:
Sample Project
Sample projects aren't quite necessary, because any .NET (including net FX and NET Core) projects will always be reproducible.
The text was updated successfully, but these errors were encountered: