-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMedianSketch.csproj
100 lines (100 loc) · 5.24 KB
/
MedianSketch.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<RootNamespace>PaintDotNet.Effects.Samples</RootNamespace>
<Nullable>enable</Nullable>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<!-- This is necessary so that the build copies the version of nuget packages we're referencing,
instead of copying the ones that Paint.NET is using (which may be trimmed and/or a different version) -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<Deterministic>False</Deterministic>
<AssemblyVersion>1.0.*</AssemblyVersion>
<PdnRoot>C:\Program Files\paint.net</PdnRoot>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;CS7035</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;CS7035</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.2.2" />
<PackageReference Include="ComputeSharp.D2D1" Version="2.1.0" />
<PackageReference Include="ILRepack" Version="2.0.18" />
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="8.0.100-1.23067.1" />
</ItemGroup>
<ItemGroup>
<!-- Be sure to set Private=False (aka CopyLocal=false) on the Paint.NET assemblies
so they are not copied to the output folder -->
<Reference Include="PaintDotNet.Base">
<HintPath>$(PdnRoot)\PaintDotNet.Base.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.ComponentModel">
<HintPath>$(PdnRoot)\PaintDotNet.ComponentModel.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Core">
<HintPath>$(PdnRoot)\PaintDotNet.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Effects.Core">
<HintPath>$(PdnRoot)\PaintDotNet.Effects.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Effects.Gpu">
<HintPath>$(PdnRoot)\PaintDotNet.Effects.Gpu.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Fundamentals">
<HintPath>$(PdnRoot)\PaintDotNet.Fundamentals.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Framework">
<HintPath>$(PdnRoot)\PaintDotNet.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Primitives">
<HintPath>$(PdnRoot)\PaintDotNet.Primitives.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.PropertySystem">
<HintPath>$(PdnRoot)\PaintDotNet.PropertySystem.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Windows">
<HintPath>$(PdnRoot)\PaintDotNet.Windows.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Windows.Core">
<HintPath>$(PdnRoot)\PaintDotNet.Windows.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PaintDotNet.Windows.Framework">
<HintPath>$(PdnRoot)\PaintDotNet.Windows.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<PropertyGroup>
<illink>C:\Users\rick\.nuget\packages\microsoft.net.illink.tasks\8.0.100-1.23067.1\tools\net7.0\illink.dll</illink>
</PropertyGroup>
<Target Name="TrimAndMerge" AfterTargets="PostBuildEvent" Condition="'$(ConfigurationName)' == 'Release'">
<!-- Trimming with ILLink -->
<Exec Command="dotnet exec "$(illink)" -a "$(TargetPath)" all --trim-mode copy --action copy -d $(TargetDir) --skip-unresolved --action link "CommunityToolkit.HighPerformance" --action link "ComputeSharp.Core" --action link "ComputeShare.D2D1" -out "$(TargetDir)output"" />
<!-- Merge with ILRepack -->
<Exec Command="C:\Users\rick\.nuget\packages\ilrepack\2.0.18\tools\ilrepack /internalize /union "$(TargetDir)output\$(TargetName).dll" "$(TargetDir)output\CommunityToolkit.HighPerformance.dll" "$(TargetDir)output\ComputeSharp.Core.dll" "$(TargetDir)output\ComputeSharp.D2D1.dll" /lib:"$(PdnRoot)" /out:"$(TargetPath)"" />
<!-- Remove the output directory and its contents created by illink -->
<Delete Files="$(TargetDir)output" ContinueOnError="false" />
<RemoveDir Directories="$(TargetDir)output" ContinueOnError="false" />
<!-- Remove DLLs that are now merged -->
<Delete Files="$(TargetDir)CommunityToolkit.HighPerformance.dll" ContinueOnError="false" />
<Delete Files="$(TargetDir)ComputeSharp.Core.dll" ContinueOnError="false" />
<Delete Files="$(TargetDir)ComputeSharp.D2D1.dll" ContinueOnError="false" />
<!-- Don't need a deps.json for single-DLL plugin -->
<Delete Files="$(TargetDir)MedianSketch.deps.json" ContinueOnError="false" />
</Target>
</Project>