Q:

Msbuild get OutputPath from main project

Say I have a game.exe that depends on engine.dll. When I build the game.csproj I want the engine.csproj to copy some stuff to the OutputPath of the project that is referencing it. 
So in this example case, I want engine.csproj to copy something to the OutputPath of game.csproj
How do I get the $(OutputPath) of game.csproj in engine.csproj?
The reason I want to do this is because I'm building a content project in game and engine like this:
<Target Name="BuildContent">
    <MSBuild Projects="Content\Content.contentproj" 
             Properties="OutputPath=MAINPROJECTPATH" />
</Target>

So I need to specify the OutputPath to the 'main project' which is the game.

A:

With a bit nosing around in some of the msbuild targets I found the solution. 
I should pass through the Parent properties like this
<Target Name="BuildContent">
      <MSBuild Projects="Content\Content.contentproj" 
               Properties="ParentOutputDir=$(ParentOutputDir); 
                           ParentIntermediateDir=$(ParentIntermediateDir); 
                           ParentProjectDir=$(ProjectDir);" />
</Target>

