-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtemplate.targets
51 lines (45 loc) · 2.23 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<OutputPath>..\..\out\$(Configuration)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<ItemGroup>
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-6qmf-mmc7-6c2p"/>
<PackageReference Include="TShock" Version="5.2.2">
<IncludeAssets>compile</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Shared\**\*.cs"/>
<EmbeddedResource Include=".\i18n\*.mo">
<LogicalName>i18n.%(FileName).mo</LogicalName>
</EmbeddedResource>
</ItemGroup>
<Target Name="CopySpecificNuGetDlls" AfterTargets="Build" Condition="'$(CopyAssemblyToOutDir)' != ''">
<ItemGroup>
<AllAssemblies Include="@(ReferencePath)" />
<SpecificNuGetDlls Include="@(AllAssemblies)"
Condition="$([System.String]::new(';$(CopyAssemblyToOutDir);').Contains(';%(Filename)%(Extension);'))" />
</ItemGroup>
<Message Text="Specific NuGet DLLs to copy: @(SpecificNuGetDlls)" Importance="high" />
<Copy SourceFiles="@(SpecificNuGetDlls)" DestinationFolder="$(OutputPath)" />
</Target>
<Target Name="githash" BeforeTargets="PreBuildEvent">
<Exec Command="git log -1 --pretty="format:%25H"" StandardOutputImportance="low" StandardErrorImportance="low" ContinueOnError="true" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="CommitHashValue"/>
</Exec>
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyInformationalVersionAttribute">
<_Parameter1>$(CommitHashValue)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Target>
</Project>