Visual Studio's debug configurations are stored in the .user
file which is user specific and traditionally ignored by source control.
I am interested in the working directory parameter. I need it to be consistent across programmer's machines and it have the value of $outDir
instead of the default $ProjectDir
.
How can I resolve these contradictions?
Add this to the end of the vcxproj before the </project>
tag:
<PropertyGroup>
<LocalDebuggerWorkingDirectory>c:\same\for\everyone</LocalDebuggerWorkingDirectory>
</PropertyGroup>
I just checked it on 2010.
Visual studio will still show $(ProjectDir) in the IDE because I guess it populates it with whatever it finds in the .user
file, but during building tasks it seems to process the .user
file after the vcxproj; without an override in the .user
it seems to accept what's set in the vcxproj.
Note that if you put this at the end of the vcxproj as I suggested, it is necessarily after the import of Microsoft.Cpp.props
which is all that's important as @Claytorpedo points out
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