forked from UnrealMultiple/TShockPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.targets
More file actions
75 lines (62 loc) · 3.38 KB
/
template.targets
File metadata and controls
75 lines (62 loc) · 3.38 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<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="UnrealMultiple.TShock-Beta" Version="6.0.1">
<IncludeAssets>compile</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Shared\**\*.cs"/>
<EmbeddedResource Include=".\i18n\*.mo">
<LogicalName>i18n.%(FileName).mo</LogicalName>
</EmbeddedResource>
</ItemGroup>
<Target Name="EmbedNuGetDlls" AfterTargets="ResolveReferences">
<ItemGroup>
<EmbedNuGetDllsList Include="$(EmbedNuGetDlls.Split(';'))" />
<DllsToEmbed Include="@(ReferencePath)"
Condition="$([System.String]::new(';$(EmbedNuGetDlls);').Contains(';%(FileName)%(Extension);'))" />
<EmbeddedResource Include="@(DllsToEmbed)">
<LogicalName>embedded.%(FileName)%(Extension)</LogicalName>
</EmbeddedResource>
<EmbeddedDllLog Include="Embedded DLL: %(DllsToEmbed.Filename)%(DllsToEmbed.Extension) as embedded.%(DllsToEmbed.Filename)%(DllsToEmbed.Extension)" />
<ReferenceCopyLocalPaths Remove="@(DllsToEmbed)" />
</ItemGroup>
<Message Text="Embedding @(DllsToEmbed->Count()) DLLs" Importance="high"
Condition="'@(DllsToEmbed->Count())' != '0'" />
<Message Text="@(EmbeddedDllLog)" Importance="high"
Condition="'@(DllsToEmbed->Count())' != '0'" />
</Target>
<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>