blob: 73501b1bf21f176db2b9fbe3391a7aee58dbbd7c (
plain)
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
82
83
84
85
86
87
88
89
90
91
92
93
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net472</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>MSBuild tasks for running the IL Linker</Description>
<!-- Don't include the build output. Instead, we want to include
the TargetFramework-specific publish output. -->
<IncludeBuildOutput>false</IncludeBuildOutput>
<!-- Suppress NuGet warning for package which sets IncludeBuildOutput=false, see https://github.com/NuGet/Home/issues/8583 -->
<NoWarn>$(NoWarn);NU5128</NoWarn>
<!-- We want to package the tasks package together with its
transitive dependencies and the linker, without marking them
as dependencies in the tasks package.
Pack doesn't support including project references
(https://github.com/NuGet/Home/issues/3891), so we work
around this by explicitly including the publish output in the
package. -->
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_LayoutPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<ItemGroup>
<Compile Include="LinkTask.cs" />
<Compile Include="CheckEmbeddedRootDescriptor.cs" />
<Compile Include="CompareSizes.cs" />
<Compile Include="ComputeManagedAssemblies.cs" />
<Compile Include="ComputeRemovedAssemblies.cs" />
<Compile Include="CreateRootDescriptorFile.cs" />
<Compile Include="CreateRuntimeRootDescriptorFile.cs" />
<Compile Include="FilterByMetadata.cs" />
<Compile Include="FindDuplicatesByMetadata.cs" />
<Compile Include="FindNativeDeps.cs" />
<Compile Include="SetAssemblyActions.cs" />
<Compile Include="Utils.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="ILLink.Tasks.targets">
<PackagePath>build</PackagePath>
</Content>
<Content Include="Sdk/Sdk.props">
<PackagePath>Sdk</PackagePath>
</Content>
</ItemGroup>
<Target Name="_LayoutPackage">
<PropertyGroup>
<PublishDir>$(BaseOutputPath)$(TargetFramework)</PublishDir>
</PropertyGroup>
<ItemGroup>
<ProjectsToPublish Include="$(MSBuildProjectFile)">
<AdditionalProperties>TargetFramework=$(TargetFramework);PublishDir=$(PublishDir)</AdditionalProperties>
</ProjectsToPublish>
</ItemGroup>
<!-- Clean the publish directory in case there are any left-over
artifacts (publish does not work incrementally). -->
<ItemGroup>
<_FilesToDelete Remove="@(_FilesToDelete)" />
<_FilesToDelete Include="$(PublishDir)/*.dll" />
<_FilesToDelete Include="$(PublishDir)/*.json" />
</ItemGroup>
<Delete Files="@(_FilesToDelete)" />
<MSBuild Projects="@(ProjectsToPublish)" Targets="Publish" />
<ItemGroup>
<TfmSpecificPackageFile Include="$(PublishDir)/*.dll" PackagePath="tools\$(TargetFramework)" />
<TfmSpecificPackageFile Include="$(PublishDir)/*.json" PackagePath="tools\$(TargetFramework)" />
</ItemGroup>
</Target>
<ItemGroup>
<ProjectReference Include="../linker/Mono.Linker.csproj" PrivateAssets="All" />
<ProjectReference Include="../../external/cecil/Mono.Cecil.csproj" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<!-- We use private assets for the Microsoft.Build packages to
prevent them from being published with the tasks dll, because
these are already a part of the SDK. -->
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" Condition=" '$(TargetFramework)' == 'net472' " PrivateAssets="All" Publish="True" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
</ItemGroup>
</Project>
|