I have a build that is running in TFS TeamBuild. I want to pass a property from that to the MSBuild that is run for each Project built by the TFSBuild.proj.
Example:
TFSBuild.proj
<PropertyGroup>
<Version>0.0.0.0</Version>
</PropertyGroup>
<Target Name="BuildNumberOverrideTarget"
DependsOnTargets="AfterInitializeWorkspace">
<!--Code that loads the version from a file (removed).-->
<PropertyGroup>
<!--Save off the version.-->
<Version>$(TxCompleteVersion)</Version>
</PropertyGroup>
MyWIXProjectFile.wixproj
<Target Name="BeforeBuild">
<PropertyGroup>
<!--If Version is defined then use that.
Else just use all zeros to show that this is a developer built version-->
<CurrentVersion Condition="'$(Version)' == ''" >0.0.0.0</CurrentVersion>
<CurrentVersion Condition="'$(Version)' != ''" >$(Version)</CurrentVersion>
</PropertyGroup>
<Message Condition="'$(Version)' == ''"
Text="Version info is empty (i.e. a developer build). Version set to $(CurrentVersion)"/>
</Target>
When the MyWixProjectFile.wixproj gets built the message showing that the $(Version) is blank gets printed every time.
Is there someway that I can get the project file to see the TFSBuild.proj properties?
Vaccano