diff --git a/.github/scripts/setup-env.sh b/.github/scripts/setup-env.sh index 24e7aa97986..33232a78d9f 100755 --- a/.github/scripts/setup-env.sh +++ b/.github/scripts/setup-env.sh @@ -45,11 +45,7 @@ echo '::endgroup::' if [[ "${OS_TYPE}" == windows && "${GPU_ARCH_TYPE}" == cuda ]]; then echo '::group::Install VisualStudio CUDA extensions on Windows' - if [[ "${VC_YEAR:-}" == "2022" ]]; then - TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Microsoft/VC/v170/BuildCustomizations" - else - TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160/BuildCustomizations" - fi + TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Microsoft/VC/v170/BuildCustomizations" mkdir -p "${TARGET_DIR}" cp -r "${CUDA_HOME}/MSBuildExtensions/"* "${TARGET_DIR}" echo '::endgroup::' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eb6d40fe9c0..7f523a04295 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -102,7 +102,7 @@ jobs: set -euxo pipefail export PYTHON_VERSION=${{ matrix.python-version }} - export VC_YEAR=2019 + export VC_YEAR=2022 export VSDEVCMD_ARGS="" export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} diff --git a/packaging/windows/internal/vc_env_helper.bat b/packaging/windows/internal/vc_env_helper.bat index 699876beb8a..1f50b1b05b5 100644 --- a/packaging/windows/internal/vc_env_helper.bat +++ b/packaging/windows/internal/vc_env_helper.bat @@ -2,14 +2,6 @@ set VC_VERSION_LOWER=17 set VC_VERSION_UPPER=18 -if "%VC_YEAR%" == "2019" ( - set VC_VERSION_LOWER=16 - set VC_VERSION_UPPER=17 -) -if "%VC_YEAR%" == "2017" ( - set VC_VERSION_LOWER=15 - set VC_VERSION_UPPER=16 -) for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [%VC_VERSION_LOWER%^,%VC_VERSION_UPPER%^) -property installationPath`) do ( if exist "%%i" if exist "%%i\VC\Auxiliary\Build\vcvarsall.bat" (