Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
tools\razzle & nuget restore
to work with NuGet 5 and later (#…
…1046) Since version 5.0.2, NuGet has used the PATH environment variable to find MSBuild.exe before looking in other file paths. See NuGet change NuGet/NuGet.Client@21f2b07 (NuGet/NuGet.Client#2687 ). Unfortunately, in PR #606 , `tools\razzle.cmd` was changed to add the MSBuild.exe folder path in _quotes_ to the PATH environment variable. Windows itself is fine with this (you can type `msbuild` and MSBuild runs), but some tools are not, including NuGet itself, so you would get errors like this: ``` D:\GitHub\metathinker\console> where nuget C:\ProgramData\chocolatey\bin\nuget.exe D:\GitHub\metathinker\console\dep\nuget\nuget.exe D:\GitHub\metathinker\console> nuget restore OpenConsole.sln Illegal characters in path. ``` `razzle.cmd` runs NuGet itself, but does so before adding the MSBuild folder to the PATH, so it was not affected by this problem. This change fixes the issue by dequotifying the PATH, so that if you already had a newer version of NuGet on your PATH before running `tools\razzle.cmd`, that version will continue to work should you need to run `nuget restore` again (such as after a `git clean -dx`).
- Loading branch information