diff options
author | Todd Grunke <toddgrun@microsoft.com> | 2017-06-06 23:41:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-06 23:41:33 +0300 |
commit | 4a6f75b8466211aa0844fe6f89de0fc7fafff598 (patch) | |
tree | 2907336c1afc878b3c540589090d5ba9175dea32 /main/winbuild.bat | |
parent | 2456c35537beaac32885b7a7c553eaec4fbf2164 (diff) |
Update winbuild.cmd to locate msbuild.exe from outside the standard paths. (#2570)
Diffstat (limited to 'main/winbuild.bat')
-rw-r--r-- | main/winbuild.bat | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/winbuild.bat b/main/winbuild.bat index b2fd74d87e..6119775884 100644 --- a/main/winbuild.bat +++ b/main/winbuild.bat @@ -9,6 +9,14 @@ FOR %%E in (Enterprise, Professional, Community) DO ( if exist "!MSBUILD_EXE!" goto :build
)
+REM Couldn't be located in the standard locations, expand search
+FOR /F "delims=" %%E IN ('dir /b /ad "%ProgramFiles(x86)%\Microsoft Visual Studio\"') DO (
+ FOR /F "delims=" %%F IN ('dir /b /ad "%ProgramFiles(x86)%\Microsoft Visual Studio\%%E"') DO (
+ set "MSBUILD_EXE=%ProgramFiles(x86)%\Microsoft Visual Studio\%%E\%%F\MSBuild\15.0\Bin\MSBuild.exe"
+ if exist "!MSBUILD_EXE!" goto :build
+ )
+)
+
echo Could not find MSBuild 15
exit /b 1
|