Visual Studio版本号对应表
最近更新:2024-05-27 15:20:25
从一个外行角度看,VC/VS有3种版本号,具备一定的迷惑性:(xx表示具体的数字)
MSVC++ xx
(VC版本 eg. VC6.0)
_MSC_VER xx
VisualStudio xx
(VS版本 eg. VS2012)
对照关系整理如下(更新至2022.3.26):
VC 版本 |
_MSC_VER 宏的值 |
VS 版本 |
MSVC toolset version |
---|---|---|---|
VC6.0 | 1200 | VS 6.0 | |
VC7.0 | 1300 | VS2002 | |
VC7.1 | 1310 | VS2003 | |
VC8.0 | 1400 | VS2005 | 80 |
VC9.0 | 1500 | VS2008 | 90 |
VC10.0 | 1600 | VS2010 | 100 |
VC11.0 | 1700 | VS2012 | 110 |
VC12.0 | 1800 | VS2013 | 120 |
VC14.0 | 1900 | VS2015 | 140 |
VC15.0 | [1910,1916] | VS2017 | 141 |
VC16.0 | [1920,1929] | VS2019 | 142 |
VC17.0 | [1930,) | VS2022 | 143 |
对于 VS2022,CMake 文档中 MSVC_VERSION 的信息更新有延迟, 它目前(2024-05-27 15:22:56)仍认为 1939 是最大可能的取值,而 VS2022 17.10.0 版本中 _MSC_VER
这一 c/c++ 宏取值为 1940, cmake 变量 MSVC_VERSION
也变为了 1940.
Table 1. Mapping of VS 2022 update releases to current MSVC versions ( MSVC Toolset Minor Version Number 14.40 in VS 2022 v17.10
)
Visual Studio Releases | Updates with new MSVC Tools | MSVC version | _MSC_VER | End of Support |
---|---|---|---|---|
Visual Studio 2022 | GA (Version 17.0) LTSC | 19.30.30705 | 1930 | Jul 11, 2023 |
Version 17.1 | 19.31.31103 | 1931 | May 10, 2022 | |
Version 17.2 LTSC | 19.32.31326 | 1932 | Jan 9, 2024 | |
Version 17.3 | 19.33.31629 | 1933 | Nov 8, 2022 | |
Version 17.4.14 LTSC | 19.34.31948 | 1934 | Jul 11, 2024 | |
Version 17.5.3 | 19.35.32216 | 1935 | May 16, 2023 | |
Version 17.6.11 LTSC | 19.36.32544 | 1936 | Jan 9, 2025 | |
Version 17.7.7 | 19.37.32826 | 1937 | Nov 14, 2023 | |
Version 17.8.6 LTSC | 19.38.33135 | 1938 | Jul 8, 2025 | |
Version 17.9 | 19.39.xxxxx | 1939 | TBD | |
Version 17.10 | 19.40.xxxxx | 1940 | TBD | |
… | … | … | … |
refs:
- https://cmake.org/cmake/help/latest/variable/MSVC_TOOLSET_VERSION.html
- https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
- https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-160
- https://devblogs.microsoft.com/cppblog/msvc-toolset-minor-version-number-14-40-in-vs-2022-v17-10/
Greatness is never a given, it must be earned.