question

AA-5995 avatar image
0 Votes"
AA-5995 asked AA-5995 commented

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

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.

vs-msbuild
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, for your issue, please directly report it to product team in Developer Community: https://developercommunity.visualstudio.com/report?space=8&entry=problem.
Thanks for your understanding!

0 Votes 0 ·

@AnnaXiu-MSFT, thanks for your attention! I'm not sure whether it's an MSBuild bug or not; more likely it isn't. I'm asking whether this is supposed to work in the first place, and whether I've done something wrong in my .user file.

0 Votes 0 ·

0 Answers