The MSVC toolset will increment its minor version number from 19.39 (VS 2022 v17.9) to 19.40 (VS 2022 v17.10). The MSVC toolset will be version 19.40.33521.0 in the preview 1 release. For more details, see the MSVC Toolset Minor Version Number 14.40 in VS 2022 v17.10 blog post: https://aka.ms/msvc-ver14.40
cl 2>&1 | findstr /R /c:"19\.1.\." > NUL && set VS_VERSION=15
cl 2>&1 | findstr /R /c:"19\.2.\." > NUL && set VS_VERSION=16
cl 2>&1 | findstr /R /c:"19\.3.\." > NUL && set VS_VERSION=17
+ cl 2>&1 | findstr /R /c:"19\.4.\." > NUL && set VS_VERSION=17
if not defined VS_VERSION (
echo Error: Visual Studio version too old ^(before 14 ^(2015^)^) or version detection failed.
goto quit