tags:

views:

264

answers:

2

Is it possible to pass a property from one msbuild project to another? So in one .proj file there is a property with PropertyName="Foo" (for example). Can we access this from another .proj file i.e. use "$(Foo)" in the other msbuild project?

+1  A: 

One way to do it is to pass properties as you call the next script, e.g.

<MSBuild Projects="another.proj" Properties="PropertyName=$(Foo)" />
Cristian Libardo
A: 

By using the Import element in the file where you want to use the property.

<Import Project="ProjectPath"/>
madgnome