Is it possible to change the working directory through the VC ++ property sheet?

I am planning to create several related C ++ projects that will have a few common settings (output path, exe naming convention, intermediate directory ...) and I managed to install most of them that I need besides the working directory:

enter image description here

It is set to $ (ProjectDir) by default, but I want it to be $ (OutDir) and I was hoping to achieve this through the Property Sheet.

Unfortunately, the property sheet itself (not the project property pages shown above) does not contain a Debug section:

enter image description here

Is it possible to override the working directory value using the property sheet in VS 2015 Community Edition (Update 3)?

+3


source to share


1 answer


Apparently, these settings are usually stored in a file foo.vcxproj.user

(if changed from the defaults), but can be placed in a property sheet. Putting this on your property sheet should do what you want:



<PropertyGroup Label="Debugging Properties">
    <LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>

      

+2


source







All Articles