diff --git a/eng/native/init-vs-env.cmd b/eng/native/init-vs-env.cmd index 629ce20aaa7fd..7eefeea127155 100644 --- a/eng/native/init-vs-env.cmd +++ b/eng/native/init-vs-env.cmd @@ -50,9 +50,14 @@ if "%VisualStudioVersion%"=="16.0" ( set __PlatformToolset=v142 goto :SetVCEnvironment ) +if "%VisualStudioVersion%"=="17.0" ( + set __VSVersion=vs2022 + set __PlatformToolset=v142 + goto :SetVCEnvironment +) :VSMissing -echo %__MsgPrefix%Error: Visual Studio 2019 with C++ tools required. ^ +echo %__MsgPrefix%Error: Visual Studio 2019 or 2022 with C++ tools required. ^ Please see https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/windows-requirements.md for build requirements. exit /b 1