mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-20 03:59:55 +08:00
Making ClickToBuild compatible with VS 2019
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
REM Necessary for the InstallDir variable to work inside the MsBuild-finding loop below.
|
REM Necessary for the InstallDir variable to work inside the MsBuild-finding loop below.
|
||||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
for /f "usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -version "[15.0,16.0)" -requires Microsoft.Component.MSBuild`) do (
|
for /f "usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -version "[15.0,17.0)" -requires Microsoft.Component.MSBuild`) do (
|
||||||
if /i "%%i"=="installationPath" (
|
if /i "%%i"=="installationPath" (
|
||||||
set InstallDir=%%j
|
set InstallDir=%%j
|
||||||
echo !InstallDir!
|
echo !InstallDir!
|
||||||
@@ -12,6 +12,11 @@ for /f "usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -vers
|
|||||||
set msbuild="!InstallDir!\MSBuild\15.0\Bin\MSBuild.exe"
|
set msbuild="!InstallDir!\MSBuild\15.0\Bin\MSBuild.exe"
|
||||||
goto build
|
goto build
|
||||||
)
|
)
|
||||||
|
if exist "!InstallDir!\MSBuild\Current\Bin\MSBuild.exe" (
|
||||||
|
echo "Using MSBuild from Visual Studio 2019"
|
||||||
|
set msbuild="!InstallDir!\MSBuild\Current\Bin\MSBuild.exe"
|
||||||
|
goto build
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user