NuGet / Home

Repo for NuGet Client issues
Other
1.49k stars 250 forks source link

Command line MSBuildVersion parameter should support 15 #4941

Open emgarten opened 7 years ago

emgarten commented 7 years ago

nuget.exe auto detects msbuild 15, but fails when passing in -MSBuildVersion 15

> D:\tmp\nuget.4.0.0.exe restore -msbuildversion 15
Cannot find the specified version of msbuild: '15'

The help also does not list 15.

 -MSBuildVersion 
Specifies the version of MSBuild to be used with this command. Supported values are 4, 12, 14. By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild.

//cc @AArnott

brandonh-msft commented 7 years ago

Well, now the docs do show v15:

(3.2+) Specifies the version of MSBuild to be used with this command. Supported values are 4, 12, 14, 15. By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild.

but the error persists (I just filed #5170)...

ITCBB commented 7 years ago

Dealing with this issue since yesterday. I actually had to uninstall previous MSBuid versions on my build server and remove the -MSBuildVersion argument from the call to get it to work with 15.1.

watashiSHUN commented 7 years ago

how does nuget3.5 -MSBuildVersion work? with nuget4.0 -MSBuildPath, it is straight forward (I need to locate the exact msbuild.exe on my machine).

how can I make sure my msbuild15 can be discovered by nuget3.5? where does it look? do I need the willow api?

johnrutherford commented 7 years ago

I'm having this same issue too.

rrelyea commented 7 years ago

I think msbuild might be version 15.1, not 15? @watashiSHUN - In order to discover the per VS install (per willow) - I believe you need to use NuGet.exe 4.1.0 or later