The <PlatformToolset/>
property is not exposed via project property sheets. It's unfortunate, as I have to run through several projects spread over several solutions to change this value if you are upgrading a compiler (to VS 2013 in my case).
I could write a script or a small program that can open vcxproj files, treat them as xml and insert this property at all the strategic locations, but that seems a bit hackish to me.
What is the recommended approach here?
To change the platform toolsetIn the properties page, select Platform Toolset and then select the toolset you want from the drop-down list. For example, if you've installed the Visual Studio 2010 toolset, select Visual Studio 2010 (v100) to use it for your project. Choose the OK button to save your changes.
To open the Property Pages, choose Project > Properties from the main menu, or right-click on the project node in Solution Explorer and choose Properties. Individual files also have property pages that enable you to set compile and build options for just that file.
right click on the project that you want to add a . props file for and choose "Add Existing Property Sheet". You can also choose to add a new property sheet. I have my property sheet in the same folder as my solution file so that all my projects can use the same property sheet.
Setting the Platform Toolset in Visual Studio Open the property pages for your driver project. Right-click the driver project in Solution Explorer and select Properties. In the property pages for the driver project, click Configuration Properties and then click General.
The specific version of the platform toolset that you want to use is controlled by an MSBuild property called PlatformToolset. Projects can switch between tools and libraries by setting the PlatformToolset property in the project file.
In large solutions that will have many projects, it can be useful to create a property sheet at the solution level. When you add a project to the solution, use Property Manager to add that property sheet to the project. If required at the project level, you can add a new property sheet to set project-specific values.
Instead, use the Visual Studio 2013 (v120) platform toolset. By default, the PlatformToolset property is Visual Studio 2013 (v120) for both newly created Win32 user mode C++ projects and projects that were converted to Visual Studio 2013. In both cases, the PlatformToolset property is not written to the project file.
You can insert reference to file with your settings
<Import Project="FILEWITHTOOLSETSETTINGS.props" />
before line:
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
It is not a property sheet in terms of Visual Studio but it works.
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