Under "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC"
, I have different directories such as :
However, I noticed Visual Studio always uses the newest minor version.
Can I set it to use an older minor version of the toolset?
You can at a solution level. Following this guide:
-Bv
as an "Additional Options" in the C/C++ → Command Line menu item. This will output the compiler version upon building.C:\Program Files (x86)\Microsoft Visual Studio\2019\<yourVisualStudioVersion>\VC\Auxiliary\Build
and find the minor version Build.x
folder of the minor version you wish to use and open it.Microsoft.VCToolsVersion.X.Y.props
file (where X is the major version and Y is the minor)<Import Project="$(SolutionDir)\Microsoft.VCToolsVersion.X.Y.props" />
just above the line that says <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
.This should allow you to build against a specific minor version of a major version toolset. The guide also has some other ways, one of which makes use CMake which may be more flexible once configured.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With