Is it possible to import C++ options (<ClCompile>) from the .vcxproj.user file?

A A 1 Reputation point
2022-06-15T15:19:04.387+00:00

I've spent the whole day trying to get Visual Studio/MSBuild to recognize additional compiler options from the mylib.vcxproj.user file, to no avail. The file has the right name, I know this because if I make a syntax error, the project can't be loaded with a corresponding message. I've taken the example .user file from here: https://github.com/catchorg/Catch2/blob/52029935557516c6af58c007879aaabfaa742a3a/misc/SelfTest.vcxproj.user

Tried with and without the ToolsVersion="15.0" part; tried UseFullPaths as well as EnableEnhancedInstructionSet - neither works.

I need it for the same reason the repository linked above does - my cross-platform project generation system does not provide any way to disable /FC, because of its "inverted default" nature. The only way is through a user file, which I can generate, and I believe it did work for Catch2 at the time of publishing.

Microsoft Build
Microsoft Build
A Microsoft platform for building applications with Visual Studio and .NET on Windows.
369 questions
{count} votes