Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikayla Hutchinson <m.j.hutchinson@gmail.com>2017-02-10 05:03:28 +0300
committerMikayla Hutchinson <m.j.hutchinson@gmail.com>2017-02-10 06:47:01 +0300
commitd37f2ed4f9b0c7f8cb279e7fd27c504dd1a40e50 (patch)
treec56982773370de83b960940158743416927d04ba /main/winbuild.bat
parent4f33fdb7bc0cc6cc7f490048e692e6b6cca45259 (diff)
Fix winbuild.bat for VS2017 & Roslyn
Diffstat (limited to 'main/winbuild.bat')
-rw-r--r--main/winbuild.bat42
1 files changed, 38 insertions, 4 deletions
diff --git a/main/winbuild.bat b/main/winbuild.bat
index f7677aa27b..ab102b56f1 100644
--- a/main/winbuild.bat
+++ b/main/winbuild.bat
@@ -1,4 +1,38 @@
-git submodule update --init --recursive
-"external\nuget-binary\NuGet.exe" restore Main.sln
-"external\nuget-binary\NuGet.exe" restore external\RefactoringEssentials\RefactoringEssentials.sln
-"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" Main.sln /m /p:Configuration=DebugWin32 /p:Platform="Any CPU" %*
+@echo off
+setlocal enableextensions enabledelayedexpansion
+
+rem try to find MSBuild in VS2017
+rem the "correct" way is to use a COM API. not easy here.
+
+FOR %%E in (Enterprise, Professional, Community) DO (
+ set "MSBUILD_EXE=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\%%E\MSBuild\15.0\Bin\MSBuild.exe"
+ if exist "!MSBUILD_EXE!" goto :build
+)
+
+rem check for MSBuild from VS2015
+
+set "MSBUILD_EXE=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
+if exist "%MSBUILD_EXE%" goto :build
+
+echo Could not find MSBuild
+exit /b 1
+
+:build
+
+git submodule sync || goto :error
+git submodule update --init --recursive || goto :error
+"external\nuget-binary\NuGet.exe" restore Main.sln || goto :error
+
+set "CONFIG=DebugWin32"
+set "PLATFORM=Any CPU"
+
+# only perform integrated restore on RefactoringEssentials, it fails on the whole solution
+"%MSBUILD_EXE%" external\RefactoringEssentials\RefactoringEssentials.2017.sln /target:Restore %* || goto :error
+
+"%MSBUILD_EXE%" Main.sln /m "/p:Configuration=%CONFIG%" "/p:Platform=%PLATFORM%" %* || goto :error
+goto :eof
+
+:error
+
+for %%x in (%CMDCMDLINE%) do if /i "%%~x" == "/c" pause
+exit /b %ERRORLEVEL%