-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathMSBuildForUnity.csproj
81 lines (64 loc) · 3.1 KB
/
MSBuildForUnity.csproj
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
76
77
78
79
80
81
<Project>
<Import Project="SDK.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>MSBuildForUnity</PackageId>
<Description>Adds custom steps to the build to produce outputs suited for consumption in Unity 3D.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DevelopmentDependency>true</DevelopmentDependency>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<IsTool>true</IsTool>
<BuildOutputTargetFolder>buildCommon</BuildOutputTargetFolder>
<!-- Don't warn about DLL's outside of the lib folder, the DLL is for the MSBuild task so it should NOT live in the lib folder -->
<NoWarn>$(NoWarn);NU5100</NoWarn>
<!-- Dependencies need to be copied to the output directory so they can be signed -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<!-- Setup the versioning for the package based on the build number if provided -->
<PropertyGroup>
<!-- These values are set up from the repo-root Directory.Build.props file -->
<MajorVersion>$(MSB4U_MajorVersion)</MajorVersion>
<MinorVersion>$(MSB4U_MinorVersion)</MinorVersion>
<RevisionVersion>$(MSB4U_RevisionVersion)</RevisionVersion>
<Version>$(MSB4U_Version)</Version>
<PackageVersion>$(MSB4U_PackageVersion)</PackageVersion>
<AssemblyVersion>$(MSB4U_AssemblyVersion)</AssemblyVersion>
<AssemblyFileVersion>$(MSB4U_AssemblyFileVersion)</AssemblyFileVersion>
</PropertyGroup>
<ItemGroup>
<Content Include="$(PackageId).props;$(PackageId).targets;">
<PackagePath>build;buildCrossTargeting</PackagePath>
</Content>
<Content Include="
UnityMetaFileGenerator.props;
UnityMetaFileGenerator.targets;
Publish.props;
Publish.targets;
RemapSymbolSources.props;
RemapSymbolSources.targets;
">
<PackagePath>buildCommon</PackagePath>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" Version="15.9.20" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.9.20" />
<PackageReference Include="Mono.Cecil" Version="0.11.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
<!--
There is a runtime dependency on Mono.Cecil and Newtonsoft for the tasks. Unfortunately there is no way to express that as a NuGet package dependency for build tasks.
The only real option is to bundle the Mono.Cecil DLL's into our own package.
-->
<Target Name="EmbedMonoCecil">
<ItemGroup>
<Content Include="$(OutputPath)\Mono.Cecil.dll" PackagePath="buildCommon" />
<Content Include="$(OutputPath)\Mono.Cecil.*.dll" PackagePath="buildCommon" />
<Content Include="$(OutputPath)\Newtonsoft.Json.dll" PackagePath="buildCommon" />
</ItemGroup>
</Target>
<Import Project="SDK.targets" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<PackDependsOn>EmbedMonoCecil;$(PackDependsOn)</PackDependsOn>
</PropertyGroup>
</Project>