Build Event Macros for Other Projects in the Solution

Posted by Adam Driscoll on Stack Overflow See other posts from Stack Overflow or by Adam Driscoll
Published on 2010-06-03T14:19:51Z Indexed on 2010/06/03 14:24 UTC
Read the original article Hit count: 225

Is it possible to reference other projects' properties via a macro within a build event?

For example:

  • "Tool1" outputs to directory ..\..\bin\Release
  • "Component1" uses "Tool1" in its post-buildevent
  • To get to "Tool1", "Component1"'s project must do something like $(SolutionDir)bin\Release

This requires that Tool1 always output to ..\..\bin\Release. If this is changed this breaks the other project. I know there is no indication to this within the macro list but is there a way to reference another project? Maybe like $(OtherProject.TargetDir)...

I know WIX has a similar syntax [$(var.OtherProject.TargetDir)] but I think that may be a different mechanism.

© Stack Overflow or respective owner

Related posts about visual-studio-2010

Related posts about macros