diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4a0f42c9def382..0e947671c001e7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -234,9 +234,9 @@ https://github.com/dotnet/runtime eb51b02b158c3ff71a1ec7eac8a211d1d464c1a5 - + https://github.com/dotnet/linker - c6434f6e8a0a1bfbb77261ac9f85c98b781613e5 + 6374217e191b8cef0c5a3d862f4291583eb959f4 https://github.com/dotnet/xharness diff --git a/eng/Versions.props b/eng/Versions.props index 1d482aee1df6b8..b16b95f4f7b53b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -177,7 +177,7 @@ 7.0.0-preview-20220331.1 - 7.0.100-1.22205.1 + 7.0.100-1.22220.4 $(MicrosoftNETILLinkTasksVersion) 7.0.0-preview.4.22178.2 diff --git a/src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj b/src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj index b3345cdd982ff2..60ae63b5e20242 100644 --- a/src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj +++ b/src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj @@ -15,6 +15,7 @@ true false + false diff --git a/src/libraries/System.Globalization/tests/IcuTests.cs b/src/libraries/System.Globalization/tests/IcuTests.cs index e5433487ac9deb..671c5036fbd979 100644 --- a/src/libraries/System.Globalization/tests/IcuTests.cs +++ b/src/libraries/System.Globalization/tests/IcuTests.cs @@ -18,17 +18,25 @@ public class IcuTests public static void IcuShouldBeUsedByDefault() { Type globalizationMode = Type.GetType("System.Globalization.GlobalizationMode"); - if (globalizationMode != null) + MethodInfo methodInfo = globalizationMode?.GetProperty("UseNls", BindingFlags.NonPublic | BindingFlags.Static)?.GetMethod; + + if (methodInfo != null) { - MethodInfo methodInfo = globalizationMode.GetProperty("UseNls", BindingFlags.NonPublic | BindingFlags.Static)?.GetMethod; - if (methodInfo != null) - { - Assert.False((bool)methodInfo.Invoke(null, null)); - return; - } + // When GlobalizationMode is present + Assert.False((bool)methodInfo.Invoke(null, null)); } + else + { + // When GlobalizationMode is trimmed + Type cultureDataType = Type.GetType("System.Globalization.CultureData"); + Assert.NotNull(cultureDataType); - throw new XunitException("Couldn't get System.Globalization.GlobalizationMode.UseIcu property."); + methodInfo = cultureDataType.GetMethod("NlsGetCultureDataFromRegionName", BindingFlags.NonPublic | BindingFlags.Static); + Assert.Null(methodInfo); + + methodInfo = cultureDataType.GetMethod("InitIcuCultureDataCore", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance); + Assert.NotNull(methodInfo); + } } [ConditionalFact(nameof(IsIcuCompatiblePlatform))] diff --git a/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs b/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs index b9e3fdac3051a6..832312ab7e5951 100644 --- a/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs +++ b/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs @@ -172,6 +172,8 @@ public GeneratedTypeInfo GetProxyType( // Unconditionally generates a new proxy type derived from 'baseType' and implements 'interfaceType' [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2062:UnrecognizedReflectionPattern", Justification = "interfaceType is annotated as preserve All members, so any Types returned from GetInterfaces should be preserved as well once https://github.com/mono/linker/issues/1731 is fixed.")] + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2072:UnrecognizedReflectionPattern", + Justification = "interfaceType is annotated as preserve All members, so any Types returned from GetInterfaces should be preserved as well once https://github.com/mono/linker/issues/1731 is fixed.")] private GeneratedTypeInfo GenerateProxyType( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type baseType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType) diff --git a/src/mono/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.wasm.xml b/src/mono/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.wasm.xml index 4ee64149df2f53..f0304dd4631658 100644 --- a/src/mono/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.wasm.xml +++ b/src/mono/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.wasm.xml @@ -9,8 +9,5 @@ - - - diff --git a/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs b/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs index 0ea6071efc529a..733cebdd4c36b4 100644 --- a/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs @@ -1609,24 +1609,6 @@ internal override FieldInfo GetField(FieldInfo fromNoninstanciated) return att.Length != 0 ? ((DefaultMemberAttribute)att[0]).MemberName : null; } - private RuntimeConstructorInfo? m_serializationCtor; - internal RuntimeConstructorInfo? GetSerializationCtor() - { - if (m_serializationCtor == null) - { - var s_SICtorParamTypes = new Type[] { typeof(SerializationInfo), typeof(StreamingContext) }; - - m_serializationCtor = GetConstructor( - BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, - null, - CallingConventions.Any, - s_SICtorParamTypes, - null) as RuntimeConstructorInfo; - } - - return m_serializationCtor; - } - private object? CreateInstanceMono(bool nonPublic, bool wrapExceptions) { RuntimeConstructorInfo? ctor = GetDefaultConstructor();