File tree Expand file tree Collapse file tree 1 file changed +21
-8
lines changed
Expand file tree Collapse file tree 1 file changed +21
-8
lines changed Original file line number Diff line number Diff line change 1- for /f " usebackq tokens=*" %%i in (`lib\vswhere\vswhere -latest -version " [15.0,16.0)" -requires Microsoft.Component.MSBuild -property installationPath`) do (
2- set InstallDir = %%i
1+ @ echo off
2+
3+ for /f " usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -version " [15.0,16.0)" -requires Microsoft.Component.MSBuild`) do (
4+ if /i " %%i " == " installationPath" (
5+ set InstallDir = %%j
6+ if exist " %InstallDir% \MSBuild\15.0\Bin\MSBuild.exe" (
7+ echo " Using MSBuild from Visual Studio 2017"
8+ set msbuild = " %InstallDir% \MSBuild\15.0\Bin\MSBuild.exe"
9+ goto build
10+ )
11+ )
312)
413
5-
614FOR %%b in (
7- " %InstallDir% \Common7\Tools\VsMSBuildCmd.bat"
8- " %VS140COMNTOOLS% \Common7\Tools\vsvars32.bat"
15+ " %VS140COMNTOOLS% \vsvars32.bat"
16+ " %VS120COMNTOOLS% \vsvars32.bat"
17+ " %VS110COMNTOOLS% \vsvars32.bat"
918 ) do (
1019 if exist %%b (
11- call %%b
12- goto build
20+ echo " Using MSBuild from %%b "
21+ call %%b
22+ set msbuild = " msbuild"
23+ goto build
1324 )
1425)
1526
@@ -27,6 +38,8 @@ IF "%solution%" == "" SET solution=src\Orchard.sln
2738
2839lib\nuget\nuget.exe restore %solution%
2940
30- msbuild /t:%target% %project% /p:Solution=%solution% /m
41+ %msbuild% /t:%target% %project% /p:Solution=%solution% /m
42+
43+ :end
3144
3245pause
You can’t perform that action at this time.
0 commit comments