sharp-chat/SharpChat.Common/SharpChat.Common.csproj

25 lines
799 B
XML
Raw Permalink Normal View History

2022-08-30 15:05:29 +00:00
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>SharpChat</RootNamespace>
</PropertyGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<!-- Write name of latest Git tag name to version.txt if non-debug build -->
<Exec Condition="'$(Configuration)'!='DEBUG'" Command="git describe --abbrev=0 --tags --always &gt; version.txt" />
<!-- Write hash of latest commit to version.txt if debug build -->
<Exec Condition="'$(Configuration)'=='DEBUG'" Command="git log --pretty=&quot;%25%25H&quot; -n1 HEAD &gt; version.txt" />
</Target>
<ItemGroup>
<None Remove="version.txt" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="version.txt" />
</ItemGroup>
</Project>