The Version is 1.0.0.0 even though both the file version and product version are defined in the DLL and display correctly when I view its properties in Windows 7. Any suggestions?
<Target Name="TestingAssemblyIdentity">
<GetAssemblyIdentity AssemblyFiles="MyCSharp.dll">
<Output TaskParameter="Assemblies" ItemName="assemblyInfo"/>
</GetAssemblyIdentity>
<Message Text="GetAssemblyIdentity Version is %(assemblyInfo.Version)" />
</Target>
The GetAssemlyIdentity task returns the assembly version (AssemblyVersionAttribute), not the file or product version. The later are not part of the assembly's identity.
Note that assembly version and assembly file/product version serve different purposes.
See here for a possible way to read the file version from within msbuild.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With