Skip to content

Commit

Permalink
Pass all required components to vswhere in BuildGVFSForWindows.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbriggs committed Oct 4, 2018
1 parent f40e3d6 commit bfe8a13
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Scripts/BuildGVFSForWindows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ SET vswhere=%~dp0..\..\packages\vswhere.%vswherever%\tools\vswhere.exe

:: Use vswhere to find the latest VS installation (including prerelease installations) with the msbuild component.
:: See https://github.com/Microsoft/vswhere/wiki/Find-MSBuild
for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -products * -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.Component.NetFX.Core.Runtime Microsoft.VisualStudio.Component.VC.CLI.Support Microsoft.VisualStudio.Component.Windows10SDK.10240 -property installationPath`) do (
set VsInstallDir=%%i
)

IF NOT DEFINED VsInstallDir (
echo ERROR: Could not locate a Visual Studio installation with required components.
echo Refer to Readme.md for a list of the required Visual Studio components.
exit /b 10
)

SET msbuild="%VsInstallDir%\MSBuild\15.0\Bin\amd64\msbuild.exe"
IF NOT EXIST %msbuild% (
echo Error: Could not find msbuild
exit /b 1
echo ERROR: Could not find msbuild
exit /b 1
)

%msbuild% %~dp0\..\GVFS.sln /p:GVFSVersion=%GVFSVersion% /p:Configuration=%SolutionConfiguration% /p:Platform=x64 || exit /b 1
Expand Down

0 comments on commit bfe8a13

Please sign in to comment.