-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
SampleWindowsForms.csproj
102 lines (90 loc) · 4.89 KB
/
SampleWindowsForms.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
101
102
<Project Sdk="Microsoft.NET.Sdk">
<!--<Import Project="$(MSBuildSDKsPath)\Microsoft.NET.Sdk\Sdk\Sdk.props" />-->
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWindowsForms Condition="'$(WinFormsRepoRoot)' == ''">True</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<_SuppressWinFormsTrimError>true</_SuppressWinFormsTrimError>
<TrimMode>link</TrimMode>
<BuiltInComInteropSupport>false</BuiltInComInteropSupport>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
<IlcGenerateDgmlFile>false</IlcGenerateDgmlFile>
<IlcGenerateMapFile>false</IlcGenerateMapFile>
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
<IlcInvariantGlobalization>true</IlcInvariantGlobalization>
<IlcFoldIdenticalMethodBodies>true</IlcFoldIdenticalMethodBodies>
<IlcOptimizationPreference>Size</IlcOptimizationPreference>
<IlcDisableReflection>false</IlcDisableReflection>
<CustomResourceTypesSupport>true</CustomResourceTypesSupport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishTrimmed>true</PublishTrimmed>
<PublishAot Condition="'$(TargetFramework)' != 'net6.0-windows'">true</PublishAot>
<TrimmerDefaultAction>link</TrimmerDefaultAction>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="SimpleImage.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<RdXmlFile Include="rd.xml" />
</ItemGroup>
<ItemGroup Condition="$(IlcDisableReflection) != true">
<IlcCompileInput Include="--appcontextswitch:System.Resources.UseSystemResourceKeys=true" />
<IlcCompileInput Include="--appcontextswitch:Switch.System.Reflection.Assembly.SimulatedLocationInBaseDirectory=true" />
<IlcCompileInput Include="--feature:System.Resources.UseSystemResourceKeys=true" />
<IlcCompileInput Include="--feature:System.Collections.Generic.DefaultComparers=false" />
<IlcCompileInput Include="--appcontextswitch:Switch.System.Reflection.Disabled.DoNotThrowForNames=true" />
<IlcCompileInput Include="--appcontextswitch:Switch.System.Reflection.Disabled.DoNotThrowForAssembly=true" />
<RuntimeHostConfigurationOption Include="System.Windows.Forms.PictureBox.UseWebRequest" Value="false" Trim="true" />
</ItemGroup>
<ItemGroup Condition="$(IlcDisableReflection) == true">
<RuntimeHostConfigurationOption Include="Switch.System.Reflection.Assembly.SimulatedLocationInBaseDirectory" Value="true" />
<RuntimeHostConfigurationOption Include="Switch.System.Reflection.Disabled.DoNotThrowForNames" Value="true" />
<RuntimeHostConfigurationOption Include="Switch.System.Reflection.Disabled.DoNotThrowForAssembly" Value="true" />
<RuntimeHostConfigurationOption Include="System.Windows.Forms.PictureBox.UseWebRequest" Value="false" Trim="true" />
</ItemGroup>
<ItemGroup>
<TrimmableAssembly Include="System.Windows.Forms" />
<TrimmableAssembly Include="System.Windows.Forms.Primitives" />
</ItemGroup>
<Target Name="ConfigureTrimming" BeforeTargets="PrepareForILLink">
<ItemGroup>
<ManagedAssemblyToLink Condition="'%(Filename)' == 'System.Windows.Forms'">
<IsTrimmable>true</IsTrimmable>
</ManagedAssemblyToLink>
<ManagedAssemblyToLink Condition="'%(Filename)' == 'System.Windows.Forms.Primitives'">
<IsTrimmable>true</IsTrimmable>
</ManagedAssemblyToLink>
<ManagedAssemblyToLink Condition="'%(Filename)' == 'System.Resources.Extensions'">
<IsTrimmable>true</IsTrimmable>
</ManagedAssemblyToLink>
</ItemGroup>
</Target>
<ItemGroup>
<ProjectReference Include="..\..\WinFormsComInterop\WinFormsComInterop.csproj" Condition="'$(UseNet8)' != 'True'" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup Condition="'$(WinFormsRepoRoot)' != ''">
<PackageReference Include="System.Resources.Extensions" Version="8.0.0-*" />
<PackageReference Include="System.Drawing.Common" Version="8.0.0-*" />
<Reference Include="$(WinFormsRepoRoot)\artifacts\bin\System.Windows.Forms\Debug\net8.0\System.Windows.Forms.dll" />
<Reference Include="$(WinFormsRepoRoot)\artifacts\bin\System.Windows.Forms.Primitives\Debug\net8.0\System.Windows.Forms.Primitives.dll" />
</ItemGroup>
<!--<Import Project="$(MSBuildSDKsPath)\Microsoft.NET.Sdk\Sdk\Sdk.targets" />
<Import Project="$(IlcPath)\build\Microsoft.NETCore.Native.targets" Condition="'$(IlcPath)' != ''"/>-->
</Project>