From e688fcf0a4fae1c11fad1f4dfa9a8aa902c6c270 Mon Sep 17 00:00:00 2001 From: Brennan Date: Sun, 9 May 2021 20:45:19 -0700 Subject: [PATCH] Allow build with VS2022 installed (#52487) --- eng/native/init-vs-env.cmd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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