+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<linker>
- <assembly fullname="System.Private.CoreLib">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2070</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Reflection.CustomAttribute.AddCustomAttributes(System.RuntimeType.ListBuilder{System.Object}@,System.Reflection.RuntimeModule,System.Int32,System.RuntimeType,System.Boolean,System.RuntimeType.ListBuilder{System.Object})</property>
- <property name="Justification">Suppressed in 7.0 for ref param changes: https://github.com/dotnet/runtime/commit/50d289cc2b945c8ee6b4cca5b71d8d137c09a762</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2063</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.RuntimeType.GetInterface(System.String,System.Boolean)</property>
- <property name="Justification">Suppressed in 7.0 for dataflow improvements: https://github.com/dotnet/runtime/commit/2e353d18b81732133aadbee888a801fd9f935fbf</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2067</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType,System.RuntimeType)</property>
- <property name="Justification">Suppressed in 7.0 for ref param changes: https://github.com/dotnet/runtime/commit/50d289cc2b945c8ee6b4cca5b71d8d137c09a762</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2067</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType)</property>
- <property name="Justification">Suppressed in 7.0 for ref param changes: https://github.com/dotnet/runtime/commit/50d289cc2b945c8ee6b4cca5b71d8d137c09a762</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2068</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Reflection.Emit.TypeBuilder.CreateTypeNoLock</property>
- <property name="Justification">Suppressed in 7.0 for ref param changes: https://github.com/dotnet/runtime/commit/50d289cc2b945c8ee6b4cca5b71d8d137c09a762</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2069</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Reflection.Emit.TypeBuilder.CreateTypeNoLock</property>
- <property name="Justification">Suppressed in 7.0 for ref param changes: https://github.com/dotnet/runtime/commit/50d289cc2b945c8ee6b4cca5b71d8d137c09a762</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2119</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Diagnostics.Tracing.EventSource.WriteEventString(System.String)</property>
- <property name="Justification">Suppressed in 7.0 for compiler-generated code changes: https://github.com/dotnet/runtime/commit/4a79e0696b1e425a58d8f5104cc572f39dd3005ea</property>
- </attribute>
- </assembly>
-
- <assembly fullname="System.ComponentModel.Annotations">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2068</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.ComponentModel.DataAnnotations.AssociatedMetadataTypeTypeDescriptor.TypeDescriptorCache.GetAssociatedMetadataType(System.Type)</property>
- <property name="Justification">Suppressed in 7.0 for ref param changes: https://github.com/dotnet/runtime/commit/50d289cc2b945c8ee6b4cca5b71d8d137c09a762</property>
- </attribute>
- </assembly>
-
- <assembly fullname="System.Data.Common">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2060</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Data.DataRowExtensions.UnboxT`1.Create()</property>
- <property name="Justification">Suppressed in 7.0 for new constraint warning: https://github.com/dotnet/runtime/commit/31d5d23e9c6f3da877343ccb020e85ca9f136c05</property>
- </attribute>
- </assembly>
-
- <assembly fullname="System.Reflection.Metadata">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2070</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Reflection.CustomAttribute.AddCustomAttributes(System.RuntimeType.ListBuilder`1@,System.Reflection.RuntimeModule,System.Int32,System.RuntimeType,System.Bool,System.RuntimeType.ListBuilder{System.Object})</property>
- <property name="Justification">Suppressed in 7.0 for ref param changes: https://github.com/dotnet/runtime/commit/50d289cc2b945c8ee6b4cca5b71d8d137c09a762</property>
- </attribute>
- </assembly>
-
- <assembly fullname="System.Diagnostics.DiagnosticSource">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2119</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.#ctor(System.String,System.Int32,System.Int32,System.Diagnostics.DiagnosticSourceEventSource,System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform)</property>
- <property name="Justification">Suppressed in 7.0 for compiler-generated code changes: https://github.com/dotnet/runtime/commit/4a79e0696b1e425a58d8f5104cc572f39dd3005ea</property>
- </attribute>
- </assembly>
-
- <assembly fullname="System.Runtime.Serialization.Formatters">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2065</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(System.Type)</property>
- <property name="Justification">Suppressed in 7.0 for dataflow improvements: https://github.com/dotnet/runtime/commit/2e353d18b81732133aadbee888a801fd9f935fbf</property>
- </attribute>
- </assembly>
-
- <assembly fullname="System.Text.Json">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2055</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Text.Json.Serialization.Converters.FSharpTypeConverterFactory.CreateConverter(System.Type,System.Text.Json.JsonSerializerOptions)</property>
- <property name="Justification">Suppressed in 7.0 for new constraint warning: https://github.com/dotnet/runtime/commit/31d5d23e9c6f3da877343ccb020e85ca9f136c05</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2070</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Text.Json.Serialization.Converters.EnumConverterFactory.GetEnumConverterType(System.Type)</property>
- <property name="Justification">Suppressed in 7.0 for new constraint warning: https://github.com/dotnet/runtime/commit/31d5d23e9c6f3da877343ccb020e85ca9f136c05</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2070</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Text.Json.Serialization.Converters.NullableConverterFactory.GetNullableConverterType(System.Type)</property>
- <property name="Justification">Suppressed in 7.0 for new constraint warning: https://github.com/dotnet/runtime/commit/31d5d23e9c6f3da877343ccb020e85ca9f136c05</property>
- </attribute>
- </assembly>
-
- <assembly fullname="System.Private.Xml">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2118</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Xml.Serialization.TypeScope.#cctor</property>
- <property name="Justification">Suppressed in 7.0 for compiler-generated code changes: https://github.com/dotnet/runtime/commit/4a79e0696b1e425a58d8f5104cc572f39dd3005ea</property>
- </attribute>
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2118</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Xml.Serialization.TypeScope.AddSoapEncodedTypes(System.String)</property>
- <property name="Justification">Suppressed in 7.0 for compiler-generated code changes: https://github.com/dotnet/runtime/commit/4a79e0696b1e425a58d8f5104cc572f39dd3005ea</property>
- </attribute>
- </assembly>
-
- <assembly fullname="System.Private.DataContractSerialization">
- <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
- <argument>ILLink</argument>
- <argument>IL2118</argument>
- <property name="Scope">member</property>
- <property name="Target">M:System.Runtime.Serialization.DateTimeDataContract.#ctor</property>
- <property name="Justification">Suppressed in 7.0 for compiler-generated code changes: https://github.com/dotnet/runtime/commit/4a79e0696b1e425a58d8f5104cc572f39dd3005ea</property>
- </attribute>
- </assembly>
-
-</linker>
\ No newline at end of file
switches can flow to the runtimeconfig.json. Features are disabled
by default since they may require assemblies, types or members that
could be removed by the ILLink, causing a trimmed app to crash. -->
- <PropertyGroup Condition="'$(PublishTrimmed)' == 'true' And
- $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))">
+ <PropertyGroup Condition="'$(PublishTrimmed)' == 'true'">
<StartupHookSupport Condition="'$(StartupHookSupport)' == ''">false</StartupHookSupport>
<CustomResourceTypesSupport Condition="'$(CustomResourceTypesSupport)' == ''">false</CustomResourceTypesSupport>
<EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization Condition="'$(EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization)' == ''">false</EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization>
<PropertyGroup Condition="'$(SuppressTrimAnalysisWarnings)' == '' And '$(PublishTrimmed)' == 'true' And '$(EnableTrimAnalyzer)' != 'true'">
- <!-- Trim analysis warnings are suppressed for .NET < 6. -->
- <SuppressTrimAnalysisWarnings Condition="$([MSBuild]::VersionLessThan('$(TargetFrameworkVersion)', '6.0'))">true</SuppressTrimAnalysisWarnings>
<!-- Suppress for WPF/WinForms -->
<SuppressTrimAnalysisWarnings Condition="'$(UseWpf)' == 'true' Or '$(UseWindowsForms)' == 'true'">true</SuppressTrimAnalysisWarnings>
<!-- Otherwise, for .NET 6+, warnings are on by default -->
<Target Name="ILLink"
Condition=" '$(PublishTrimmed)' == 'true' And
'$(RunILLink)' != 'false' And
- '$(_TargetFrameworkVersionWithoutV)' >= '3.0' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp' "
+ '$(TargetFrameworkIdentifier)' == '.NETCoreApp' "
DependsOnTargets="_RunILLink">
<NETSdkError Condition="'$(_ILLinkExitCode)' != '' And '$(_ILLinkExitCode)' != '0'" ResourceName="ILLinkFailed" />
is a NativeAOT app, value of SelfContained doesn't matter. -->
<NETSdkError Condition="'$(RunILLink)' != 'false' And '$(SelfContained)' != 'true'" ResourceName="ILLinkNotSupportedError" />
+ <Warning Condition="'$(SuppressILLinkExplicitPackageReferenceWarning)' != 'true' And
+ '%(PackageReference.Identity)' == 'Microsoft.NET.ILLink.Tasks' And '%(PackageReference.IsImplicitlyDefined)' != 'true'"
+ Text="Delete explicit 'Microsoft.NET.ILLink.Tasks' package reference in your project file to avoid versioning problems." />
+
<PropertyGroup Condition=" '$(ILLinkWarningLevel)' == '' ">
<ILLinkWarningLevel Condition=" '$(EffectiveAnalysisLevel)' != '' And
$([MSBuild]::VersionGreaterThanOrEquals($(EffectiveAnalysisLevel), '5.0')) ">5</ILLinkWarningLevel>
</PropertyGroup>
<!-- In .NET 7, TrimmerDefaultAction is deprecated. TrimMode can be used for the supported configurations. -->
- <Warning Condition="'$(TrimmerDefaultAction)' != '' And $([MSBuild]::VersionGreaterThan('$(TargetFrameworkVersion)', '6.0'))"
- Text="Property 'TrimmerDefaultAction' is deprecated in .NET 7 and will be ignored. Use TrimMode instead." />
-
- <!-- Use a sidecar file to suppress warnings when targeting net6.0, for changes that added or changed warnings. -->
- <ItemGroup Condition="$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0'))">
- <_ILLinkSuppressions Include="$(MSBuildThisFileDirectory)6.0_suppressions.xml" />
- </ItemGroup>
+ <Warning Condition="'$(TrimmerDefaultAction)' != ''"
+ Text="Property 'TrimmerDefaultAction' is deprecated in .NET 7 and higher and will be ignored. Use TrimMode instead." />
<PropertyGroup Condition="'@(_ILLinkSuppressions->Count())' != '0'">
<_ExtraTrimmerArgs>$(_ExtraTrimmerArgs) --link-attributes "@(_ILLinkSuppressions->'%(Identity)', '" --link-attributes "')"</_ExtraTrimmerArgs>
</PropertyGroup>
- <!-- Set up TrimMode and TrimmerDefaultAction. -->
+ <!-- Set up TrimMode. -->
<PropertyGroup>
- <TrimMode Condition="'$(TrimMode)' == '' And $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '6.0'))">copyused</TrimMode>
- <TrimMode Condition="'$(TrimMode)' == '' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0'))">partial</TrimMode>
<TrimMode Condition="'$(TrimMode)' == ''">full</TrimMode>
-
- <!-- Set TrimmerDefaultAction for compat in < 7.0 -->
- <_TrimmerDefaultAction Condition="$([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '7.0'))">$(TrimmerDefaultAction)</_TrimmerDefaultAction>
- <_TrimmerDefaultAction Condition="'$(_TrimmerDefaultAction)' == '' And $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '6.0'))">$(TrimMode)</_TrimmerDefaultAction>
- <_TrimmerDefaultAction Condition="'$(_TrimmerDefaultAction)' == '' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0'))">copy</_TrimmerDefaultAction>
</PropertyGroup>
<PropertyGroup>
<TrimmerSingleWarn Condition=" '$(TrimmerSingleWarn)' == '' ">true</TrimmerSingleWarn>
</PropertyGroup>
- <!-- Suppressions to work around issues in previous versions of the framework. See https://github.com/dotnet/runtime/issues/40336 -->
- <PropertyGroup Condition="'$(SuppressTrimAnalysisWarnings)' == 'true' And $([MSBuild]::VersionLessThan('$(TargetFrameworkVersion)', '6.0'))">
- <!-- Framework embedded XML descriptors reference windows-only members. -->
- <NoWarn Condition=" !$(RuntimeIdentifier.StartsWith('win')) ">$(NoWarn);IL2008</NoWarn> <!-- Unresolved type referenced in XML. -->
- <NoWarn Condition=" !$(RuntimeIdentifier.StartsWith('win')) ">$(NoWarn);IL2009</NoWarn> <!-- Unresolved member on type referenced in XML. -->
- <!-- Framework has DynamicDependencyAttributes that reference windows-only members. -->
- <NoWarn Condition=" !$(RuntimeIdentifier.StartsWith('win')) ">$(NoWarn);IL2037</NoWarn> <!-- Unresolved member for DynamicDependencyAttribute -->
- <!-- Framework embedded XML descriptors reference 32-bit-only members. -->
- <NoWarn Condition=" '$(PlatformTarget)' != 'x64' AND '$(PlatformTarget)' != 'arm64'">$(NoWarn);IL2009;IL2012</NoWarn> <!-- Unresolved field referenced in XML -->
- </PropertyGroup>
-
- <!-- Enable serialization discovery for compat in < 7.0 -->
- <PropertyGroup Condition="$([MSBuild]::VersionLessThan('$(TargetFrameworkVersion)', '7.0'))">
- <_ExtraTrimmerArgs>--enable-serialization-discovery $(_ExtraTrimmerArgs)</_ExtraTrimmerArgs>
- </PropertyGroup>
-
<!-- Set a default value for TrimmerRemoveSymbols unless set explicitly. -->
<PropertyGroup Condition=" '$(TrimmerRemoveSymbols)' == '' ">
<!-- The default is to remove symbols when debugger support is disabled, and keep them otherwise. -->
<TrimmerRemoveSymbols Condition=" '$(DebuggerSupport)' != 'false' ">false</TrimmerRemoveSymbols>
</PropertyGroup>
- <PropertyGroup Condition="'$(_TrimmerUnreachableBodies)' == '' And
- '$(PublishTrimmed)' == 'true' And
- $([MSBuild]::VersionLessThan($(_TargetFrameworkVersionWithoutV), '6.0'))">
- <_TrimmerUnreachableBodies>false</_TrimmerUnreachableBodies>
- </PropertyGroup>
-
<!-- Set IsTrimmable for any assemblies that already have customized TrimMode. -->
<ItemGroup>
<ManagedAssemblyToLink Condition=" '%(ManagedAssemblyToLink.TrimMode)' != '' ">
<TrimmerRootAssembly Include="@(IntermediateAssembly)" RootMode="EntryPoint" />
</ItemGroup>
- <!-- For .NET < 6, root and copy assemblies without IsTrimmable=true MSBuild metadata. -->
- <ItemGroup Condition=" $([MSBuild]::VersionLessThan('$(TargetFrameworkVersion)', '6.0')) ">
- <TrimmerRootAssembly Include="@(ManagedAssemblyToLink)" Condition=" '%(ManagedAssemblyToLink.IsTrimmable)' != 'true' " />
- <ManagedAssemblyToLink Condition=" '%(ManagedAssemblyToLink.IsTrimmable)' != 'true' ">
- <TrimMode>copy</TrimMode>
- </ManagedAssemblyToLink>
- </ItemGroup>
-
<ItemGroup>
<!-- Don't collapse to a single warning for the intermediate assembly.
This just sets metadata on the items in ManagedAssemblyToLink that came from IntermediateAssembly. -->