summaryrefslogtreecommitdiff
path: root/tests/runtest.cmd
diff options
context:
space:
mode:
authorJose Perez Rodriguez <joperezr@microsoft.com>2017-10-03 15:21:52 -0700
committerGitHub <noreply@github.com>2017-10-03 15:21:52 -0700
commitaae414026671e3dc1ccf0f308d351ac04cc746a4 (patch)
tree7854947379c68e2b03c476f3744db1a699cf1b6a /tests/runtest.cmd
parent3716918ee67ea2e8d8271c9a214159e56687f043 (diff)
downloadcoreclr-aae414026671e3dc1ccf0f308d351ac04cc746a4.tar.gz
coreclr-aae414026671e3dc1ccf0f308d351ac04cc746a4.tar.bz2
coreclr-aae414026671e3dc1ccf0f308d351ac04cc746a4.zip
Update Buildtools and Roslyn (#14228)
* Update Buildtools and Roslyn * Fixing importing of the roslyn files on msbuild 14.0 * Correctly looking for the latest VS Installation
Diffstat (limited to 'tests/runtest.cmd')
-rw-r--r--tests/runtest.cmd17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runtest.cmd b/tests/runtest.cmd
index 84136a455c..eb1894599f 100644
--- a/tests/runtest.cmd
+++ b/tests/runtest.cmd
@@ -22,6 +22,23 @@ set __MSBuildBuildArch=x64
:: is already configured to use that toolset. Otherwise, we will fallback to using the VS2015
:: toolset if it is installed. Finally, we will fail the script if no supported VS instance
:: can be found.
+if defined VisualStudioVersion goto :Run
+
+set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
+if exist %_VSWHERE% (
+ for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
+)
+if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
+if not exist "%_VSCOMNTOOLS%" (
+ echo Error: Visual Studio 2015 or 2017 required.
+ echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
+ exit /b 1
+)
+
+call "%_VSCOMNTOOLS%\VsDevCmd.bat"
+
+:Run
+
set __VSVersion=vs2017
if defined VS140COMNTOOLS set __VSVersion=vs2015