diff --git a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs index ba38fc0e5b40..2bbfb716a966 100644 --- a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs +++ b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs @@ -168,6 +168,38 @@ public static void AssertWarnings(this List actualWarnings, Lis "Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetImplicitConversionOperator(Type,Type,Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethods(BindingFlags)'. The parameter '#0' of method 'Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetImplicitConversionOperator(Type,Type,Type)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.", } }, + new WarningsPerCode + { + Code = "IL2072", + Messages = new List + { + "Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.<>c__DisplayClass2_0.b__0(): 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'. The return value of method 'Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetTypeConverterType(IEnumerable`1)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.", + "Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.<>c__DisplayClass2_0.b__0(): 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'. The return value of method 'Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetTypeConverterType(IEnumerable`1)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.", + } + }, + new WarningsPerCode + { + Code = "IL2057", + Messages = new List + { + "Microsoft.Maui.Controls.Xaml.TypeConversionExtensions.GetTypeConverterType(IEnumerable`1): Unrecognized value passed to the parameter 'typeName' of method 'System.Type.GetType(String)'. It's not possible to guarantee the availability of the target type.", + } + }, + } + }, + new WarningsPerFile + { + File = "src/Controls/src/Core/Routing.cs", + WarningsPerCode = new List + { + new WarningsPerCode + { + Code = "IL2111", + Messages = new List + { + "Microsoft.Maui.Controls.Routing..cctor(): Method 'Microsoft.Maui.Controls.Routing.RegisterRoute(String,Type)' with parameters or return value with `DynamicallyAccessedMembersAttribute` is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method.", + } + }, } }, new WarningsPerFile