(1a6547633) Write the version number to a "Version.txt" file in the output folder during the build process

This commit is contained in:
Joonas Rikkonen
2019-05-06 11:29:41 +03:00
parent cffaef3c3c
commit 08559f3438
6 changed files with 265 additions and 37 deletions
@@ -281,7 +281,12 @@
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Target Name="AfterBuild">
<!-- Write version number to a "Version.txt" file in the output folder -->
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="CurrentAssembly" />
</GetAssemblyIdentity>
<Exec Command="echo v%(CurrentAssembly.Version) > $(TargetDir)Version.txt"></Exec>
</Target>
</Project>