When I change the assembly information to lets say 1.0.0.1 i thought that i could read the version with $(Version) but it seems that it does not change?
A:
You could use the GetAssemblyIdentity
task to retrieve the version :
<Target Name="AfterBuild">
<GetAssemblyIdentity AssemblyFiles="$(OutputPath)\$(AssemblyName).$(OutputType)">
<Output TaskParameter="Assemblies" ItemName="AssemblyIdentities"/>
</GetAssemblyIdentity>
<PropertyGroup>
<CssOutputFile Condition="'$(CssOutputFile)'==''">
..\Styles\master-%(AssemblyIdentities.Version).css
</CssOutputFile>
</PropertyGroup>
<Message Text="CssOutputFile : $(CssOutputFile)"/>
</Target>
madgnome
2010-06-07 14:50:06
Ok I see, how can I use the value inside a propertygroup?Like this CssOutputFile Condition=" '$(CssOutputFile)'=='' ">..\Styles\master-VERSION-HERE.css</CssOutputFile>
Marcus
2010-06-07 15:13:35
I've updated the code for this usage.
madgnome
2010-06-07 15:54:30