Fix vswhere path to work with spaces by surrounding it with quotes (#44913)
authorMac Clayton <mckenzieclayton@gmail.com>
Thu, 10 Dec 2020 04:35:58 +0000 (22:35 -0600)
committerGitHub <noreply@github.com>
Thu, 10 Dec 2020 04:35:58 +0000 (04:35 +0000)
Some local .nuget paths may contain spaces (ex. C:\Users\First
Last\.nuget). Surrounding it with quotes allows the command path to have
spaces

src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj

index 9bba95a..f9e3f23 100644 (file)
@@ -14,7 +14,7 @@
 
   <Target Name="ResolveDIALibToCopy" BeforeTargets="AssignTargetPaths">
     <PropertyGroup>
-      <VSWherePath>$([MSBuild]::NormalizePath('$(Pkgvswhere)','tools','vswhere.exe'))</VSWherePath>
+      <VSWherePath>"$([MSBuild]::NormalizePath('$(Pkgvswhere)','tools','vswhere.exe'))"</VSWherePath>
     </PropertyGroup>
     <Exec
       Command="$(VSWherePath) -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath"
@@ -32,4 +32,4 @@
   <ItemGroup>
     <ProjectReference Include="../DIALib/DIALib.ilproj" />
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>