-
Notifications
You must be signed in to change notification settings - Fork 252
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 does not work with msbuild 12 as of 3.5.0 [fixed in 4.0.0] #4091
Comments
It looks like your command line is looking for msbuild version 12, but the error complains that you are loading v14. |
Hi Rob, Thanks for your prompt answer. Before NuGet CLI version 3.5.0.1938, We were using the NuGet CLI version 3.4.4.1321. When using version 3.4.4.1321 everything works flawlessly. If We switch to version 3.5.0.1938 then the mentioned error is reported. We though that adding the "-MsBuildVersion 12" parameter with version 3.5.0.1938 would solve the issue, but clearly that didn't worked. We really appreciate your help. Regards, |
@zhili1208 - would be great to understand workaround...and also understand if there is a bug that we should be fixing. |
We did some work in NuGet 3.5.0 to deal with the major changes in VS 2017, which includes support for side by side install of VS and msbuild. No MsBuild is in the gac anymore. Workaround - install Msbuild v14 on your machine. This will allow NuGet 3.5.0 to find msbuild v12 well. Our current plan is to fix this in NuGet 4.0, please let us know if this workaround isn't feasible until that is available. |
+1 on this exact error message. Except we aren't doing anything with TFS and we hit it for the For us this happens on a machine with only VS2013 installed, which runs msbuild v12 from the command line via batch script for a build. Part of the batch script pulls nuget.exe from I would prefer not to install Msbuild v14.0 as a workaround as I don't know what else that will break for our build processes. Our CI servers use MsBuild 12.0 as well so it isn't just a case of changing things on one machine. |
@rliberoff Would you be happy to edit the title of this issue to the more general "nuget.exe does not work with msbuild 12 as of 3.5.0"? I think it better reflects the actual issue which we now know is not specific to TFS 2013. |
I still experience the issue with NuGet Version: 4.3.0.4406 and NuGet Version: 4.1.0.2450. The automatic detection works fine:
If I specify explicit msbuild versions, I get errors:
|
could you share the 14 and 12 msbuild full version number on your machine? |
@zhili1208 here are the full versions:
|
@o7g8 Please clone my repo https://github.com/zhili1208/NuGetMsbuildChecker, build it and run "NuGetMsbuildChecker.exe 14", it will print all msbuild information. Thanks |
@zhili1208 thank you for you answer! Here is the output from the tool:
Can it be an issue with processing of |
@o7g8 looks like there is an issue with parsing the version string |
@o7g8 I think the issue is parsing version string dosen't use InvariantCulture, I fixed it in my NuGetMsbuildChecker, could you pull it and try it again? thanks |
@zhili1208 thank you! now it works :)
and for 14 as well:
|
Great, I will fix this in product |
Fixed in NuGet/NuGet.Client@e7bf7fe |
We are downloading the latest version of the NuGet CLI from this URL "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" which is configured in the NuGet.targets file to always download it when doing a build in TFS 2013.
When executing the "nuget.exe pack" the following error happens:
The TFS reports the following invocation (some info removed due to NDA):
C:>"C:\Builds\5......\src\NuGet.exe"
pack "C:\Builds\5......\src......vbproj" -IncludeReferencedProjects -Properties "Configuration=Release;Platform=AnyCPU;OutputPath=C:\Builds\5......\bin"
-NonInteractive -OutputDirectory "C:\Builds\5......\bin" -symbols -MsBuildVersion 12 -Version 7.0.6190.34419
The NuGet CLI version is 3.5.0.1938
Could someone please help us?
The text was updated successfully, but these errors were encountered: