Skip to content

Commit 2519224

Browse files
committed
Update VS check
1 parent a6e155d commit 2519224

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

build.cmd

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mkdir bin
66

77
:Build
88

9-
REM Require VS2022 (v17.0) on the system. Use `vswhere` for the search because it can find all VS installations.
9+
REM Require Visual Studio on the system. Use `vswhere` for the search because it can find all VS installations.
1010
set vswhere="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
1111
if not exist %vswhere% (
1212
set vswhere="%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"
@@ -23,25 +23,20 @@ if not exist %vswhere% (
2323
)
2424

2525
set InstallDir=
26-
for /f "usebackq tokens=*" %%i in (`%vswhere% -version 17 -latest -prerelease -products * ^
26+
for /f "usebackq tokens=*" %%i in (`%vswhere% -latest -prerelease -products * ^
2727
-property installationPath`) do (
2828
set "InstallDir=%%i"
2929
)
3030

3131
if not DEFINED InstallDir (
32-
echo "Could not find a VS2022 installation."
33-
echo Please install VS2022 or the missing components.
32+
echo "Could not find a Visual Studio installation."
33+
echo Please install Visual Studio or the missing components.
3434
goto BuildFail
3535
)
3636

3737
REM Add MSBuild to the path.
3838
set "PATH=%InstallDir%\MSBuild\Current\Bin;%PATH%"
3939

40-
REM Configure NuGet operations to work w/in this repo i.e. do not pollute system packages folder.
41-
REM Note this causes two copies of packages restored using packages.config to land in this folder e.g.
42-
REM StyleCpy.5.0.0/ and stylecop/5.0.0/.
43-
set "NUGET_PACKAGES=%~dp0packages"
44-
4540
REM Are we running in a local dev environment (not on CI)?
4641
if DEFINED CI (set Desktop=false) else if DEFINED TEAMCITY_VERSION (set Desktop=false) else (set Desktop=true)
4742

0 commit comments

Comments
 (0)