I'm using Msbuild to compile and generate .zip files and installers and I need the version number of my assembyInfo.
I'm using this code.
<Target Name="getversion">
<GetAssemblyIdentity AssemblyFiles="$(BuildDir)myprogram.exe">
<Output TaskParameter="Assemblies" ItemName="fooAssemblyInfo"/>
</GetAssemblyIdentity>
<Message Text="Version = %(fooAssemblyInfo.Version)"/>
</Target>
But this returns Version = 2.0.0.29110, I need just the minor and major version.
Is there any way to read the assembyInfo.cs information without a custom task?
See Question&Answers more detail:os