VS2019能否使用旧版C++编译器(16.6版本)?无需重装
How to Downgrade to VS2019 16.6 C++ Compiler Without Full Reinstall
I’ve dealt with frustrating compiler bugs from VS updates before, so I get why you want to avoid a full reinstall. Here’s a step-by-step way to switch to the 16.6 compiler while keeping your existing VS2019 setup:
Step 1: Install the 16.6 MSVC Build Tools via Visual Studio Installer
- Open the Visual Studio Installer (you can find it in your Start Menu under "Visual Studio 2019").
- Select your VS2019 installation (e.g., Community, Professional) and click Modify.
- Switch to the Individual components tab.
- In the search bar, type
MSVC v142 - VS 2019 C++ x64/x86 build tools. Look for the version tagged with 16.6.x (this corresponds to MSVC v14.26, the compiler version for VS2019 16.6) and check the box next to it. - Optional: If you want to remove the problematic 16.7 compiler, find the 16.7 version component (labeled with v14.27) and uncheck it.
- Click Modify at the bottom right and wait for the installer to finish adding/removing components.
Step 2: Switch Your Project to Use the 16.6 Compiler
Once the components are installed, update your project settings to use the older compiler:
- Open your C++ project in VS2019.
- Right-click your project in the Solution Explorer and select Properties.
- Navigate to Configuration Properties > General.
- In the Platform Toolset dropdown menu, select the 16.6 toolset option (it should look like
Visual Studio 2019 (v142)with the v14.26 version indicator, or explicitly labeledMSVC v142 (v14.26)depending on your setup). - Click Apply and OK.
- Clean your project (right-click > Clean) then rebuild it (right-click > Rebuild) to ensure no leftover files from the old compiler cause issues.
If the 16.6 Component Isn’t Visible in Installer
If the 16.6 build tools don’t show up in the installer’s component list, you can install them via command line:
- Open Command Prompt as Administrator.
- Run this command (replace the install path with your VS2019 directory if it’s different):
vs_installer.exe modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --version 16.6.0 - Wait for the command to complete, then follow Step 2 to switch your project’s toolset.
内容的提问来源于stack exchange,提问作者NoSenseEtAl
相关产品推荐
相关产品推荐

