-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.targets
31 lines (27 loc) · 1.1 KB
/
template.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<OutputPath>..\out\$(Configuration)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TShock" Version="5.1.3">
<ExcludeAssets>contentFiles</ExcludeAssets>
</PackageReference>
</ItemGroup>
<Target Name="githash" BeforeTargets="PreBuildEvent">
<Exec Command="git log -1 --pretty="format:%25H"" ContinueOnError="true" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="CommitHashValue" />
</Exec>
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyInformationalVersionAttribute">
<_Parameter1>$(CommitHashValue)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Target>
</Project>