NuGet.exe msbuildpath fails when there is a trailing slash #4180

Closed
emgarten opened this Issue Jan 3, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@emgarten
Contributor

emgarten commented Jan 3, 2017

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

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Jan 3, 2017

Contributor

//cc @zhili1208

Contributor

emgarten commented Jan 3, 2017

//cc @zhili1208

@zhili1208

This comment has been minimized.

Show comment
Hide comment
@zhili1208

zhili1208 Jan 3, 2017

Contributor

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)\VS\DogFood\d15prerel\26102.01\MSBuild\15.0\Bin\ "

then it will work well

Contributor

zhili1208 commented Jan 3, 2017

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)\VS\DogFood\d15prerel\26102.01\MSBuild\15.0\Bin\ "

then it will work well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment