@John Dibling: This is a bad solution for any group that runs on parallel branches; you will have to constantly change your environment or locally edit .props files in each branch. It's a pity when you constantly switch branches.
Unfortunately, I cannot find a better solution. In my head, there would be something where the top level .props defines a custom macro, such as PROJECT_ROOT (defined as "../../"), and then other .props files inherit and use this macro. This way you can share one .props file with solutions with several different relative paths. Unfortunately, it seems that user macros are not inherited in .props files.
There must be a real solution that does not include local configuration of the build environment, given the static directory structure across multiple branches.
EDIT:
Looks like I found a solution for this, for real. Basically you have one relativepath.props file that defines a custom macro with your relative path, another props file that uses this macro for all its paths, and then the file that you actually import into your vcxproj will look like this, including both sheets of properties. This is the only way to get it to use a macro from one file in other files.
Then different solutions in different relative paths can use different paths, and properties are defined only once in realprops.props.
<ImportGroup Label="PropertySheets"> <Import Project="relativepath.props" /> <Import Project="realprops.props" /> </ImportGroup>
source share