This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
SXS20240115/SRC/MESWin/shared file/MakeVersion.targets
2024-01-15 10:57:41 +08:00

16 lines
913 B
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Include="My Project\BuildIncrementVersionInfo.vb" Condition="exists('My Project\BuildIncrementVersionInfo.vb')" />
</ItemGroup>
<PropertyGroup>
<Year>$([System.DateTime]::Now.ToString("yy").Substring(1, 1))</Year>
<Month>$([System.DateTime]::Now.ToString("MM"))</Month>
<Date>$([System.DateTime]::Now.ToString("dd"))</Date>
<Time>$([System.DateTime]::Now.ToString("HHmm0"))</Time>
<AssemblyFileVersionAttribute>&lt;Assembly: Reflection.AssemblyFileVersion("6.0.5.$(Year)$(Month)$(Date)")&gt;</AssemblyFileVersionAttribute>
</PropertyGroup>
<Target Name="BeforeBuild">
<WriteLinesToFile File="My Project\BuildIncrementVersionInfo.vb" Lines="$(AssemblyFileVersionAttribute)" Overwrite="true"></WriteLinesToFile>
</Target>
</Project>