ForeverLearning
ForeverLearning

Reputation: 6705

Platform Toolset property in Visual Studio property sheets

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?

Upvotes: 8

Views: 1944

Answers (2)

Michael Brown
Michael Brown

Reputation: 1

I do the above solution, but if the vcxproj files have the platformtoolset version defined it doesn't work and will use that specified platformtoolset defined in the project.

I ended up removing all platformtoolset definitions from 2100 project files. I go back and forth on if I should have just made a product platform tool set property and just set the platform toolset to this property in the project.

I did edit the projects automatically as I needed to fix some other properties and build items. It wasn't to hard to automate.

Upvotes: 0

Boris Nikitin
Boris Nikitin

Reputation: 429

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.

Upvotes: 1

Related Questions