microsoft / microsoft/vscode-cpptools
Wrong _MSC_VER
Open
Nobody has claimed this yet.
Feature Request
Language Service
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and Version: Windows 10 22H2
- VS Code Version: 1.133.0
- C/C++ Extension Version: 1.32.2
Bug Summary and Steps to Reproduce
Bug Summary: _MSC_VER displayed as 1951 when using VS2022, expected value: 1944.
Configuration and Logs
- c_cpp_properties.json
{
"configurations": [
{
"name": "VS 2022",
"compilerPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.44.35207\\bin\\Hostx64\\x64\\cl.exe",
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
}
- C/C++: Log Diagnostics
-------- Diagnostics - 8/17/2026, 12:40:56 AM
Version: 1.32.2
Current Configuration:
{
"name": "VS 2022",
"compilerPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.44.35207\\bin\\Hostx64\\x64\\cl.exe",
"intelliSenseMode": "windows-msvc-x64",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": false,
"cppStandardIsExplicit": false,
"intelliSenseModeIsExplicit": true,
"recursiveIncludesReduceIsExplicit": false,
"recursiveIncludesPriorityIsExplicit": false,
"recursiveIncludesOrderIsExplicit": false,
"compilerPathInCppPropertiesJson": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.44.35207\\bin\\Hostx64\\x64\\cl.exe",
"mergeConfigurations": false,
"recursiveIncludes": {},
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
Modified Settings:
{
"C_Cpp.loggingLevel": "Debug"
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.32.2.0
Current database path: C:\Users\huangqinjin\AppData\Local\Microsoft\vscode-cpptools\90d20250051651e1d809c1c7e0c52070\.BROWSE.VC.DB
Translation Unit Mappings:
[ C:\tmp\main.cpp - source TU]:
Translation Unit Configurations:
[ C:\tmp\main.cpp ]
Process ID: 7256
Memory Usage: 136 MB
Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe
Include Paths:
system include: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include
system include: C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um
system include: C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt
system include: C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared
system include: C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt
system include: C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt
Standard Version: ms_c++17
IntelliSense Mode: windows-msvc-x64
Total Memory Usage: 136 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 5043
- The language server logging
loggingLevel: 6
LSP: (received - deferred) textDocument/didOpen: file:///c%3A/tmp/main.cpp
LSP: (received) cpptools/preinitialize (id: 1)
LSP: (invoked) cpptools/preinitialize (id: 1)
LSP: Sending response (id: 1)
LSP: Message ignored due to no registered handler: $/setTrace
LSP: (received) cpptools/initialize (id: 2)
LSP: (invoked) cpptools/initialize (id: 2)
cpptools version (TypeScript): 1.32.2
cpptools version (native): 1.32.2.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
LSP: Sending response (id: 2)
LSP: (received) cpptools/queryCompilerDefaults (id: 3)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 3)
Compiler info database not connected - skipping load.
Compiler info database not connected - skipping load.
LSP: Sending response (id: 3)
Processed c_cpp_properties.json in 0.0191128s
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/queryCompilerDefaults (id: 4)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 4)
LSP: (received) cpptools/didChangeCppProperties (id: 5)
Compiler info database not connected - skipping load.
LSP: (received) cpptools/didChangeSettings
LSP: (received) cpptools/didChangeSettings
Compiler info database not connected - skipping load.
LSP: (received) cpptools/didChangeSettings
LSP: (received) cpptools/didChangeSettings
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
LSP: (received - deferred) cpptools/didChangeVisibleTextEditors
LSP: Sending response (id: 4)
LSP: (invoked) cpptools/didChangeCppProperties (id: 5)
Code browsing service initialized
LSP: (received) cpptools/didChangeSettings
Populating file name cache...
Attempting to get defaults from C++ compiler in "compilerPath" property: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe'
Attempting to get defaults from C compiler in "compilerPath" property: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe'
Folder: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\BUILDTOOLS\VC\TOOLS\MSVC\14.44.35207\INCLUDE will be indexed
Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\CPPWINRT will be indexed
Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\SHARED will be indexed
Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\UCRT will be indexed
Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\UM will be indexed
Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\WINRT will be indexed
Folder: C:\TMP will be indexed
LSP: (queued) textDocument/didOpen: file:///c%3A/tmp/main.cpp
LSP: (queued) cpptools/didChangeVisibleTextEditors
LSP: (queued) cpptools/didChangeVisibleTextEditors
LSP: (queued) cpptools/didChangeVisibleTextEditors
LSP: Sending response (id: 5)
LSP: (invoked) cpptools/didChangeSettings
Discovering files...
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: (invoked) cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: (invoked) cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: (invoked) cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: (invoked) cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: (invoked) textDocument/didOpen: file:///c%3A/tmp/main.cpp
textDocument/didOpen: file:///c%3A/tmp/main.cpp
LSP: (invoked) cpptools/didChangeVisibleTextEditors
Intellisense update pending for: file:///c%3A/tmp/main.cpp
Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\CPPWINRT
Processing folder (non-recursive): C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\BUILDTOOLS\VC\TOOLS\MSVC\14.44.35207\INCLUDE
Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\SHARED
Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\UCRT
Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\UM
IntelliSense update scheduled and TU acquisition started for: file:///c%3A/tmp/main.cpp
Done populating filename cache. Elapsed time: 604 ms
Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\WINRT
LSP: (received) cpptools/getDocumentSymbols: file:///c%3A/tmp/main.cpp (id: 6)
Expanding recursive includes for: C:\TMP\MAIN.CPP
Processing folder (recursive): C:\TMP
Done expanding recursive includes for: C:\TMP\MAIN.CPP
Reducing recursive includes for: C:\TMP\MAIN.CPP
Done reducing recursive includes for: C:\TMP\MAIN.CPP
sending compilation args for C:\tmp\main.cpp
system include: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2022\BUILDTOOLS\VC\TOOLS\MSVC\14.44.35207\INCLUDE
system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\UM
system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\UCRT
system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\SHARED
system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\WINRT
system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.26100.0\CPPWINRT
stdver: ms_c++17
intelliSenseMode: windows-msvc-x64
LSP: (received) cpptools/getCodeActions: file:///c%3A/tmp/main.cpp (id: 7)
LSP: (invoked) cpptools/getDocumentSymbols: file:///c%3A/tmp/main.cpp (id: 6)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/tmp/main.cpp (id: 7)
LSP: Sending response (id: 7)
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/tmp/main.cpp (id: 8)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/tmp/main.cpp (id: 8)
LSP: Sending response (id: 6)
LSP: Sending response (id: 8)
Discovering files: 5043 file(s) processed
0 file(s) removed from database
Done discovering files.
Parsing remaining files...
Parsing: 0 files(s) processed
Done parsing remaining files.
LSP: $/cancelRequest (<unknown/completed>, id: 7)
LSP: (received) cpptools/getCodeActions: file:///c%3A/tmp/main.cpp (id: 9)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/tmp/main.cpp (id: 9)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 9)
LSP: (received) cpptools/getCodeActions: file:///c%3A/tmp/main.cpp (id: 10)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/tmp/main.cpp (id: 10)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 10)
LSP: (received) cpptools/getCodeActions: file:///c%3A/tmp/main.cpp (id: 11)
LSP: (invoked) cpptools/getCodeActions: file:///c%3A/tmp/main.cpp (id: 11)
LSP: Sending response (id: 11)
Update IntelliSense time (sec): 0.953
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/tmp/main.cpp (id: 12)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/tmp/main.cpp (id: 12)
LSP: Sending response (id: 12)
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/tmp/main.cpp (id: 13)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/tmp/main.cpp (id: 13)
LSP: Sending response (id: 13)
Other Extensions
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the supplied c_cpp_properties.json, compilerPath, VS 2022 toolchain, and main.cpp, then compare the extension's displayed _MSC_VER with the compiler's expected value. Use the C/C++ diagnostics log to trace compiler-default detection; done means the VS 2022 configuration reports 1944 rather than 1951.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100