diff options
author | Tanner Gooding <tagoo@outlook.com> | 2019-02-11 23:19:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-11 23:19:44 -0800 |
commit | f0770609f8cdbeba019b35af48b70840f33bd479 (patch) | |
tree | 3415d53fe0cf130ca844520d614153e900c3b0bd /setup_vs_tools.cmd | |
parent | 1c28b497ff2d49141f6a63e3f293095161e40d00 (diff) | |
download | coreclr-f0770609f8cdbeba019b35af48b70840f33bd479.tar.gz coreclr-f0770609f8cdbeba019b35af48b70840f33bd479.tar.bz2 coreclr-f0770609f8cdbeba019b35af48b70840f33bd479.zip |
Support building with VS2019 Preview (#22525)
* Support building with VS2019 Preview
* Fixing gen-buildsys-win to only set the architecture for the VS generator
* Refactoring Dev11/147911/fpcw.cpp so that it compiles under VS2019
* Removing the remaining traces of VS2015 build support
Diffstat (limited to 'setup_vs_tools.cmd')
-rw-r--r-- | setup_vs_tools.cmd | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/setup_vs_tools.cmd b/setup_vs_tools.cmd index 9af06e5bdd..24e8b230ca 100644 --- a/setup_vs_tools.cmd +++ b/setup_vs_tools.cmd @@ -1,42 +1,36 @@ @if not defined _echo @echo off -REM This script is responsible for setting up either the vs2015 or vs2017 env +REM This script is responsible for setting up the vs2017 or vs2019 env REM All passed arguments are ignored REM Script will return with 0 if pass, 1 if there is a failure to find either -REM vs2015 or vs2017 +REM vs2017 or vs2019 :: Default to highest Visual Studio version available :: -:: For VS2015 (and prior), only a single instance is allowed to be installed on a box -:: and VS140COMNTOOLS is set as a global environment variable by the installer. This -:: allows users to locate where the instance of VS2015 is installed. -:: -:: For VS2017, multiple instances can be installed on the same box SxS and VS150COMNTOOLS +:: For VS2017 and later, multiple instances can be installed on the same box SxS and VS1*0COMNTOOLS :: is no longer set as a global environment variable and is instead only set if the user -:: has launched the VS2017 Developer Command Prompt. +:: has launched the Visual Studio Developer Command Prompt. :: -:: Following this logic, we will default to the VS2017 toolset if VS150COMNTOOLS tools is -:: set, as this indicates the user is running from the VS2017 Developer Command Prompt and -:: 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. +:: Following this logic, we will default to the Visual Studio toolset assocated with the active +:: Developer Command Prompt. Otherwise, we will query VSWhere to locate the later version of +:: Visual Studio available on the machine. Finally, we will fail the script if not supported +:: instance can be found. if defined VisualStudioVersion ( if not defined __VSVersion echo %__MsgPrefix%Detected Visual Studio %VisualStudioVersion% developer command ^prompt environment goto skip_setup ) -echo %__MsgPrefix%Searching ^for Visual Studio 2017 or 2015 installation +echo %__MsgPrefix%Searching ^for Visual Studio 2017 or later installation set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %_VSWHERE% ( for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools goto call_vs ) -if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% -echo VS2017 not found, using VS2015 +echo Visual Studio 2017 or later not found :call_vs if not exist "%_VSCOMNTOOLS%" ( - echo %__MsgPrefix%Error: Visual Studio 2015 or 2017 required. + echo %__MsgPrefix%Error: Visual Studio 2017 or 2019 required. echo Please see https://github.com/dotnet/coreclr/blob/master/Documentation/building/windows-instructions.md for build instructions. exit /b 1 ) @@ -45,4 +39,4 @@ call "%_VSCOMNTOOLS%\VsDevCmd.bat" :skip_setup -exit /b 0
\ No newline at end of file +exit /b 0 |