Home: NuGet.exe msbuildpath fails when there is a trailing slash

Created on 3 Jan 2017  路  2Comments  路  Source: NuGet/Home

Restoring with a trailing \ on the msbuildpath value restore fails. When removing the trailing slash nuget.exe finds msbuild correctly.

nuget.exe restore .\ConsoleApp8.sln -msbuildpath 'C:
\Program Files (x86)\VS\DogFood\d15prerel\26102.01\MSBuild\15.0\Bin\'
Using Msbuild from 'C:\Program Files (x86)\VS\DogFood\d15prerel\26102.01\MSBuild\15.0\Bin"'.
MSBuildPath : C:\Program Files (x86)\VS\DogFood\d15prerel\26102.01\MSBuild\15.0\Bin"  doesn't not exist.

This is using a recent build of nuget.exe 4.0.0

NuGet.exe ByDesign Bug

Most helpful comment

the passing parameter is invalid, the trailing slash escaped the double quote. if user want to restore with a trailing slash, need add a space between slash and double quote.
nuget.exe restore .ConsoleApp8.sln -msbuildpath "C:
Program Files (x86)VSDogFoodd15prerel26102.01MSBuild15.0Bin "

then it will work well

All 2 comments

//cc @zhili1208

the passing parameter is invalid, the trailing slash escaped the double quote. if user want to restore with a trailing slash, need add a space between slash and double quote.
nuget.exe restore .ConsoleApp8.sln -msbuildpath "C:
Program Files (x86)VSDogFoodd15prerel26102.01MSBuild15.0Bin "

then it will work well

Was this page helpful?
0 / 5 - 0 ratings