CsWinRT icon indicating copy to clipboard operation
CsWinRT copied to clipboard

Building WinRT.Runtime results in hundreds of trim warnings

Open Sergio0694 opened this issue 2 years ago • 2 comments

Describe the bug

WinRT.Runtime is enabled for trimming, but not all APIs are correctly annotated. There's quite a few that are missing annotations, causing hundreds of warnings when building the project, as well as a not ideal experience for consumers trying to use those unannotated APIs and not getting the right warnings surfaced to them in IntelliSense.

[!NOTE] Partially related to #1319 (this is a superset of that)

To Reproduce

  1. Clone the repo
  2. Build WinRT.Runtime

Expected behavior

Builds with no warnings.

Actual result

Hundreds of trim warnings.

Build output (click to expand):
\Projections\Bindable.net5.cs(79,23,79,28): warning CA2257: The 'ABI.Microsoft.UI.Xaml.Interop.IBindableIterator.Vftbl' member on the 'ABI.Microsoft.UI.Xaml.Interop.IBindableIterator' type should be marked 'static' as 'ABI.Microsoft.UI.Xaml.Interop.IBindableIterator' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\Bindable.net5.cs(428,29,428,50): warning CA2257: The 'ABI.System.Collections.IEnumerable.AdaptiveFromAbiHelper' member on the 'ABI.System.Collections.IEnumerable' type should be marked 'static' as 'ABI.System.Collections.IEnumerable' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\Bindable.net5.cs(447,22,447,35): warning CA2257: The 'ABI.System.Collections.IEnumerable.FromAbiHelper' member on the 'ABI.System.Collections.IEnumerable' type should be marked 'static' as 'ABI.System.Collections.IEnumerable' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\Bindable.net5.cs(484,29,484,40): warning CA2257: The 'ABI.System.Collections.IEnumerable.ToAbiHelper' member on the 'ABI.System.Collections.IEnumerable' type should be marked 'static' as 'ABI.System.Collections.IEnumerable' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\Bindable.net5.cs(509,23,509,28): warning CA2257: The 'ABI.System.Collections.IEnumerable.Vftbl' member on the 'ABI.System.Collections.IEnumerable' type should be marked 'static' as 'ABI.System.Collections.IEnumerable' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\Bindable.net5.cs(250,23,250,28): warning CA2257: The 'ABI.Microsoft.UI.Xaml.Interop.IBindableVectorView.Vftbl' member on the 'ABI.Microsoft.UI.Xaml.Interop.IBindableVectorView' type should be marked 'static' as 'ABI.Microsoft.UI.Xaml.Interop.IBindableVectorView' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\Bindable.net5.cs(605,29,605,42): warning CA2257: The 'ABI.System.Collections.IList.FromAbiHelper' member on the 'ABI.System.Collections.IList' type should be marked 'static' as 'ABI.System.Collections.IList' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\Bindable.net5.cs(841,29,841,40): warning CA2257: The 'ABI.System.Collections.IList.ToAbiHelper' member on the 'ABI.System.Collections.IList' type should be marked 'static' as 'ABI.System.Collections.IList' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\Bindable.net5.cs(1030,23,1030,28): warning CA2257: The 'ABI.System.Collections.IList.Vftbl' member on the 'ABI.System.Collections.IList' type should be marked 'static' as 'ABI.System.Collections.IList' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IEnumerable.net5.cs(60,24,60,33): warning CA2256: Type 'ABI.Windows.Foundation.Collections.IIterable<T>' has the 'DynamicInterfaceCastableImplementationAttribute' applied to it but does not provide an implementation of all interface members defined in inherited interfaces
\Projections\IPropertyValue.net5.cs(1260,23,1260,28): warning CA2257: The 'ABI.Windows.Foundation.IPropertyValue.Vftbl' member on the 'ABI.Windows.Foundation.IPropertyValue' type should be marked 'static' as 'ABI.Windows.Foundation.IPropertyValue' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\INotifyCollectionChanged.net5.cs(22,23,22,28): warning CA2257: The 'ABI.System.Collections.Specialized.INotifyCollectionChanged.Vftbl' member on the 'ABI.System.Collections.Specialized.INotifyCollectionChanged' type should be marked 'static' as 'ABI.System.Collections.Specialized.INotifyCollectionChanged' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IDictionary.net5.cs(684,15,684,26): warning CA2256: Type 'ABI.System.Collections.Generic.IDictionary<K, V>' has the 'DynamicInterfaceCastableImplementationAttribute' applied to it but does not provide an implementation of all interface members defined in inherited interfaces
\Projections\IDictionary.net5.cs(708,29,708,40): warning CA2257: The 'ABI.System.Collections.Generic.IDictionary<K, V>.ToAbiHelper' member on the 'ABI.System.Collections.Generic.IDictionary<K, V>' type should be marked 'static' as 'ABI.System.Collections.Generic.IDictionary<K, V>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IDictionary.net5.cs(770,30,770,35): warning CA2257: The 'ABI.System.Collections.Generic.IDictionary<K, V>.Vftbl' member on the 'ABI.System.Collections.Generic.IDictionary<K, V>' type should be marked 'static' as 'ABI.System.Collections.Generic.IDictionary<K, V>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\ICommand.net5.cs(22,23,22,28): warning CA2257: The 'ABI.System.Windows.Input.ICommand.Vftbl' member on the 'ABI.System.Windows.Input.ICommand' type should be marked 'static' as 'ABI.System.Windows.Input.ICommand' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IEnumerable.net5.cs(143,15,143,26): warning CA2256: Type 'ABI.System.Collections.Generic.IEnumerable<T>' has the 'DynamicInterfaceCastableImplementationAttribute' applied to it but does not provide an implementation of all interface members defined in inherited interfaces
\Projections\IEnumerable.net5.cs(164,31,164,42): warning CA2257: The 'ABI.System.Collections.Generic.IEnumerable<T>.ToAbiHelper' member on the 'ABI.System.Collections.Generic.IEnumerable<T>' type should be marked 'static' as 'ABI.System.Collections.Generic.IEnumerable<T>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IEnumerable.net5.cs(174,30,174,35): warning CA2257: The 'ABI.System.Collections.Generic.IEnumerable<T>.Vftbl' member on the 'ABI.System.Collections.Generic.IEnumerable<T>' type should be marked 'static' as 'ABI.System.Collections.Generic.IEnumerable<T>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IDisposable.net5.cs(22,23,22,28): warning CA2257: The 'ABI.System.IDisposable.Vftbl' member on the 'ABI.System.IDisposable' type should be marked 'static' as 'ABI.System.IDisposable' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IServiceProvider.net5.cs(16,23,16,28): warning CA2257: The 'ABI.System.IServiceProvider.Vftbl' member on the 'ABI.System.IServiceProvider' type should be marked 'static' as 'ABI.System.IServiceProvider' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IList.net5.cs(522,15,522,20): warning CA2256: Type 'ABI.System.Collections.Generic.IList<T>' has the 'DynamicInterfaceCastableImplementationAttribute' applied to it but does not provide an implementation of all interface members defined in inherited interfaces
\Projections\IList.net5.cs(543,29,543,40): warning CA2257: The 'ABI.System.Collections.Generic.IList<T>.ToAbiHelper' member on the 'ABI.System.Collections.Generic.IList<T>' type should be marked 'static' as 'ABI.System.Collections.Generic.IList<T>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IList.net5.cs(729,30,729,35): warning CA2257: The 'ABI.System.Collections.Generic.IList<T>.Vftbl' member on the 'ABI.System.Collections.Generic.IList<T>' type should be marked 'static' as 'ABI.System.Collections.Generic.IList<T>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IReadOnlyList.net5.cs(210,15,210,28): warning CA2256: Type 'ABI.System.Collections.Generic.IReadOnlyList<T>' has the 'DynamicInterfaceCastableImplementationAttribute' applied to it but does not provide an implementation of all interface members defined in inherited interfaces
\Projections\IReadOnlyList.net5.cs(231,29,231,40): warning CA2257: The 'ABI.System.Collections.Generic.IReadOnlyList<T>.ToAbiHelper' member on the 'ABI.System.Collections.Generic.IReadOnlyList<T>' type should be marked 'static' as 'ABI.System.Collections.Generic.IReadOnlyList<T>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IReadOnlyList.net5.cs(327,30,327,35): warning CA2257: The 'ABI.System.Collections.Generic.IReadOnlyList<T>.Vftbl' member on the 'ABI.System.Collections.Generic.IReadOnlyList<T>' type should be marked 'static' as 'ABI.System.Collections.Generic.IReadOnlyList<T>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IReadOnlyDictionary.net5.cs(387,15,387,34): warning CA2256: Type 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' has the 'DynamicInterfaceCastableImplementationAttribute' applied to it but does not provide an implementation of all interface members defined in inherited interfaces
\Projections\IReadOnlyDictionary.net5.cs(408,30,408,61): warning CA2257: The 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>.ReadOnlyDictionaryKeyCollection' member on the 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' type should be marked 'static' as 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IReadOnlyDictionary.net5.cs(461,30,461,63): warning CA2257: The 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>.ReadOnlyDictionaryValueCollection' member on the 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' type should be marked 'static' as 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IReadOnlyDictionary.net5.cs(514,29,514,40): warning CA2257: The 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>.ToAbiHelper' member on the 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' type should be marked 'static' as 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\IReadOnlyDictionary.net5.cs(746,30,746,35): warning CA2257: The 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>.Vftbl' member on the 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' type should be marked 'static' as 'ABI.System.Collections.Generic.IReadOnlyDictionary<K, V>' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\INotifyDataErrorInfo.net5.cs(23,23,23,28): warning CA2257: The 'ABI.System.ComponentModel.INotifyDataErrorInfo.Vftbl' member on the 'ABI.System.ComponentModel.INotifyDataErrorInfo' type should be marked 'static' as 'ABI.System.ComponentModel.INotifyDataErrorInfo' has the 'DynamicInterfaceImplementationAttribute' applied
\Projections\INotifyPropertyChanged.net5.cs(16,23,16,28): warning CA2257: The 'ABI.System.ComponentModel.INotifyPropertyChanged.Vftbl' member on the 'ABI.System.ComponentModel.INotifyPropertyChanged' type should be marked 'static' as 'ABI.System.ComponentModel.INotifyPropertyChanged' has the 'DynamicInterfaceImplementationAttribute' applied
\strings\WinRT.cs(878,10,878,27): warning CA2255: The 'ModuleInitializer' attribute is only intended to be used in application code or advanced source generator scenarios (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2255)
\AgileReference.cs(64,18,64,36): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.AgileReference.Get<T>(Guid)' 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.
\AgileReference.cs(64,221,64,226): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>(Guid)'. The generic parameter 'T' of 'WinRT.AgileReference.Get<T>(Guid)' 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.
\AgileReference.cs(140,39,140,63): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ComWrappersSupport.CreateRcwForComObject<T>(IntPtr)'. The generic parameter 'T' of 'WinRT.AgileReference<T>' 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.
\CastExtensions.cs(37,51,37,84): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ComWrappersSupport.CreateRcwForComObject<T>(IntPtr)'. The generic parameter 'TInterface' of 'WinRT.CastExtensions.As<TInterface>(Object)' 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.
\Projections\IReferenceArray.net5.cs(151,16,151,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.Windows.Foundation.IReferenceArray<T>.AsInterface<I>()' 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.
\Projections\IReferenceArray.net5.cs(151,60,151,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.Windows.Foundation.IReferenceArray<T>.AsInterface<I>()' 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.
\ComWrappersSupport.cs(103,23,103,41): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr)' 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.
\ComWrappersSupport.cs(110,13,110,31): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr)' 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.
\ComWrappersSupport.cs(110,41,110,59): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr)' 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.
\ComWrappersSupport.cs(119,32,119,61): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReferenceWithContext<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr)' 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.
\ComWrappersSupport.cs(127,23,127,41): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr, Guid)' 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.
\ComWrappersSupport.cs(132,25,132,43): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr, Guid, Boolean)' 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.
\ComWrappersSupport.cs(139,13,139,31): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr, Guid, Boolean)' 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.
\ComWrappersSupport.cs(143,26,143,44): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr, Guid, Boolean)' 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.
\ComWrappersSupport.cs(147,26,147,44): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr, Guid, Boolean)' 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.
\ComWrappersSupport.cs(158,32,158,61): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReferenceWithContext<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface<T>(IntPtr, Guid, Boolean)' 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.
\ComWrappersSupport.cs(178,42,178,192): warning IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors', 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in call to 'System.Type.GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[])'. The return value of method 'WinRT.TypeExtensions.GetRuntimeClassCCWType(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.
\strings\WinRT.cs(357,20,357,41): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.ActivatableComponentActivationFactory<T>' 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.
\strings\WinRT.cs(330,23,330,41): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'WinRT.ActivationFactory<T>.As<I>()' 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.
\ComWrappersSupport.cs(205,31,205,57): warning IL2067: 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'WinRT.GuidGenerator.GetIID(Type)'. The parameter 'type' of method 'WinRT.ComWrappersSupport.GetInterfaceTableEntries(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.
\ComWrappersSupport.cs(219,34,219,57): warning IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.Interfaces' in call to 'System.Type.GetInterfaces()'. The return value of method 'WinRT.TypeExtensions.GetRuntimeClassCCWType(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.
\ComWrappersSupport.cs(345,41,345,71): warning IL2067: 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.Interfaces' in call to 'WinRT.ComWrappersSupport.GetInterfaceTableEntries(Type)'. The parameter 'type' of method 'WinRT.ComWrappersSupport.PregenerateNativeTypeInformation(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.
\ComWrappersSupport.cs(375,27,375,53): warning IL2067: 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'WinRT.GuidGenerator.GetIID(Type)'. The parameter 'type' of method 'lambda expression' 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.
\ComWrappersSupport.cs(435,33,435,142): warning IL2070: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The parameter 'customTypeHelperType' of method 'WinRT.ComWrappersSupport.CreateCustomTypeMappingFactory(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.
\ComWrappersSupport.cs(493,54,493,99): warning IL2067: 'implementationType' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'WinRT.ComWrappersSupport.CreateAbiNullableTFactory(Type)'. The parameter 'implementationType' of method 'WinRT.ComWrappersSupport.CreateTypedRcwFactory(Type, String)' 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.
\TypeNameSupport.cs(69,20,69,27): warning IL2073: 'WinRT.TypeNameSupport.FindRcwTypeByNameCached(String)' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' requirements. The return value of method 'System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey, Func<TKey, TValue>)' 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.
\ComWrappersSupport.cs(530,28,530,52): warning IL2068: 'WinRT.ComWrappersSupport.GetRuntimeClassForTypeCreation(IInspectable, Type)' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' requirements. The parameter 'staticallyDeterminedType' of method 'WinRT.ComWrappersSupport.GetRuntimeClassForTypeCreation(IInspectable, 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.
\ComWrappersSupport.cs(528,64,528,98): warning IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.Interfaces' in call to 'System.Type.GetInterfaces()'. The return value of method 'WinRT.TypeNameSupport.FindRcwTypeByNameCached(String)' 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.
\Interop\IMarshal.cs(253,16,253,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.WinRT.Interop.IMarshal.AsInterface<I>()' 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.
\Interop\IMarshal.cs(253,60,253,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.WinRT.Interop.IMarshal.AsInterface<I>()' 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.
\TypeNameSupport.cs(82,20,97,19): warning IL2073: 'WinRT.TypeNameSupport.FindTypeByNameCached(String)' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' requirements. The return value of method 'System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey, Func<TKey, TValue>)' 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.
\TypeNameSupport.cs(96,28,96,46): warning IL2078: 'lambda expression' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' requirements. The field '(System.Type type, System.Int32 remaining).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.
\TypeNameSupport.cs(159,32,159,45): warning IL2073: 'WinRT.TypeNameSupport.FindTypeByNameCore(String, Type[])' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' requirements. The return value of method 'WinRT.TypeNameSupport.ResolvePrimitiveType(String)' 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.
\TypeNameSupport.cs(197,24,197,36): warning IL2073: 'WinRT.TypeNameSupport.FindTypeByNameCore(String, Type[])' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' requirements. The return value of method 'WinRT.Projections.FindCustomTypeForAbiTypeName(String)' 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.
\TypeNameSupport.cs(197,24,197,36): warning IL2073: 'WinRT.TypeNameSupport.FindTypeByNameCore(String, Type[])' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' requirements. The return value of method 'System.Reflection.Assembly.GetType(String)' 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.
\Interop\IContextCallback.cs(61,16,61,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.WinRT.Interop.IContextCallback.AsInterface<I>()' 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.
\Interop\IContextCallback.cs(61,60,61,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.WinRT.Interop.IContextCallback.AsInterface<I>()' 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.
\Interop\IAgileReference.net5.cs(158,16,158,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.WinRT.Interop.IGlobalInterfaceTable.AsInterface<I>()' 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.
\Interop\IAgileReference.net5.cs(158,60,158,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.WinRT.Interop.IGlobalInterfaceTable.AsInterface<I>()' 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.
\Interop\IAgileReference.net5.cs(65,30,65,48): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'ABI.WinRT.Interop.IAgileReferenceMethods.Resolve<T>(IObjectReference, Guid)' 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.
\Interop\IActivationFactory.cs(94,16,94,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.WinRT.Interop.IActivationFactory.AsInterface<I>()' 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.
\Interop\IActivationFactory.cs(94,60,94,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.WinRT.Interop.IActivationFactory.AsInterface<I>()' 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.
\Interop\ExceptionErrorInfo.cs(454,16,454,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.WinRT.Interop.IRestrictedErrorInfo.AsInterface<I>()' 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.
\Interop\ExceptionErrorInfo.cs(454,60,454,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.WinRT.Interop.IRestrictedErrorInfo.AsInterface<I>()' 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.
\Interop\ExceptionErrorInfo.cs(421,16,421,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.WinRT.Interop.ISupportErrorInfo.AsInterface<I>()' 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.
\Interop\ExceptionErrorInfo.cs(421,60,421,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.WinRT.Interop.ISupportErrorInfo.AsInterface<I>()' 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.
\Interop\ExceptionErrorInfo.cs(340,16,340,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.WinRT.Interop.ILanguageExceptionErrorInfo.AsInterface<I>()' 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.
\Interop\ExceptionErrorInfo.cs(340,60,340,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.WinRT.Interop.ILanguageExceptionErrorInfo.AsInterface<I>()' 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.
\ComWrappersSupport.cs(867,25,867,43): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.CreateCCWForObject<T>(Object, Guid)' 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.
\ComWrappersSupport.cs(870,20,870,38): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'T' of 'WinRT.ComWrappersSupport.CreateCCWForObject<T>(Object, Guid)' 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.
\Interop\ExceptionErrorInfo.cs(251,16,251,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.WinRT.Interop.IErrorInfo.AsInterface<I>()' 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.
\Interop\ExceptionErrorInfo.cs(251,60,251,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.WinRT.Interop.IErrorInfo.AsInterface<I>()' 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.
\GuidGenerator.cs(102,13,102,101): warning IL2072: 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'WinRT.GuidGenerator.GetSignature(Type)'. The return value of method 'WinRT.TypeExtensions.GetAuthoringMetadataType(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.
\GuidGenerator.cs(91,117,91,143): warning IL2072: 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'WinRT.GuidGenerator.GetSignature(Type)'. The return value of method 'System.Reflection.FieldInfo.FieldType.get' 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.
\GuidGenerator.cs(106,67,106,82): warning IL2067: 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'WinRT.GuidGenerator.GetSignature(Type)'. The parameter 't' of method 'lambda expression' 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.
\GuidGenerator.cs(156,23,156,41): warning IL2067: 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'WinRT.GuidGenerator.GetSignature(Type)'. The parameter 'type' of method 'WinRT.GuidGenerator.CreateIID(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.
\IInspectable.cs(127,16,127,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'WinRT.IInspectable.As<I>()' 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.
\IInspectable.cs(127,51,127,56): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'WinRT.IInspectable.As<I>()' 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.
\TypeNameSupport.cs(387,39,387,59): warning IL2070: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.Interfaces' in call to 'System.Type.GetInterfaces()'. The parameter 'type' of method 'WinRT.TypeNameSupport.TryAppendWinRTInterfaceNameForType(Type, StringBuilder, TypeNameGenerationFlags)' 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.
\ComWrappersSupport.net5.cs(218,255,218,287): warning IL2067: 'implementationType' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in call to 'WinRT.ComWrappersSupport.CreateTypedRcwFactory(Type, String)'. The parameter 'classType' of method 'lambda expression' 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.
\TypeExtensions.cs(111,20,111,67): warning IL2068: 'WinRT.TypeExtensions.GetGuidType(Type)' method return value does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' requirements. The parameter 'type' of method 'WinRT.TypeExtensions.GetGuidType(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.
\TypeExtensions.cs(28,20,54,15): warning IL2073: 'WinRT.TypeExtensions.FindHelperType(Type)' method return value does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods', 'DynamicallyAccessedMemberTypes.PublicFields', 'DynamicallyAccessedMemberTypes.PublicNestedTypes' requirements. The return value of method 'System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey, Func<TKey, TValue>)' 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.
\TypeExtensions.cs(50,28,50,80): warning IL2073: 'lambda expression' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' requirements. The return value of method 'GetHelperTypeFromAttribute(WindowsRuntimeHelperTypeAttribute, 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.
\TypeExtensions.cs(53,24,53,52): warning IL2073: 'lambda expression' method return value does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods', 'DynamicallyAccessedMemberTypes.PublicFields', 'DynamicallyAccessedMemberTypes.PublicNestedTypes' requirements. The return value of method 'FindHelperTypeFallback(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.
\TypeExtensions.cs(65,28,65,101): warning IL2055: Call to 'System.Type.MakeGenericType(params Type[])' can not be statically analyzed. It's not possible to guarantee the availability of requirements of the generic type.
\Projections\Uri.cs(59,16,59,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.System.WinRTUriRuntimeClassFactory.AsInterface<I>()' 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.
\Projections\Uri.cs(59,60,59,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.System.WinRTUriRuntimeClassFactory.AsInterface<I>()' 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.
\TypeExtensions.cs(132,20,132,29): warning IL2073: 'WinRT.TypeExtensions.FindVftblType(Type)' method return value does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' requirements. The return value of method 'System.Type.GetNestedType(String)' 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.
\TypeExtensions.cs(130,29,130,88): warning IL2055: Call to 'System.Type.MakeGenericType(params Type[])' can not be statically analyzed. It's not possible to guarantee the availability of requirements of the generic type.
\Projections\Type.cs(224,43,224,58): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetConstructors(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetConstructors(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Marshalers.cs(464,35,464,142): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Projections\Type.cs(244,35,244,43): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetEvent(String, BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetEvent(String, BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(249,37,249,46): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetEvents(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetEvents(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(254,35,254,43): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetField(String, BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetField(String, BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(259,37,259,46): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetFields(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetFields(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(267,45,267,57): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetInterface(String, Boolean)' don't match overridden implicit 'this' parameter of method 'System.Type.GetInterface(String, Boolean)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(272,47,272,60): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetInterfaces()' don't match overridden implicit 'this' parameter of method 'System.Type.GetInterfaces()'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(277,38,277,48): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetMembers(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetMembers(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(282,38,282,48): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetMethods(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetMethods(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(287,45,287,58): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetNestedType(String, BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetNestedType(String, BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\TypeExtensions.cs(214,17,220,18): warning IL2026: Using member 'lambda expression' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. If authoring a WinRT component in C# using C#/WinRT authoring support, it might require ABI helper types that might get trimmed. Avoid marking such components trimmable or ensure types don't get trimmed from it.
\Projections\Type.cs(292,47,292,61): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetNestedTypes(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetNestedTypes(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(297,40,297,53): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetProperties(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Type.GetProperties(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Marshalers.cs(472,66,472,174): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Projections\Type.cs(302,32,302,44): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])' don't match overridden implicit 'this' parameter of method 'System.Type.InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(317,44,317,62): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetConstructorImpl(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])' don't match overridden implicit 'this' parameter of method 'System.Type.GetConstructorImpl(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Projections\Type.cs(322,39,322,52): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])' don't match overridden implicit 'this' parameter of method 'System.Type.GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Marshalers.cs(482,26,482,124): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Projections\Type.cs(327,41,327,56): warning IL2094: 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'ABI.System.FakeMetadataType.GetPropertyImpl(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])' don't match overridden implicit 'this' parameter of method 'System.Type.GetPropertyImpl(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage.
\Marshalers.cs(490,27,490,126): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(499,27,499,126): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(507,31,507,134): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(515,31,515,134): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(532,30,532,132): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(524,36,524,144): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(541,40,541,152): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Projections\Type.cs(144,24,144,57): warning IL2057: 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.
\Marshalers.cs(1065,20,1065,41): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.MarshalInterface<T>' 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.
\Marshalers.cs(1205,40,1205,55): warning IL2098: Parameter 'o' of method 'WinRT.MarshalInspectable<T>.CreateMarshaler<V>(T, Guid, Boolean)' has 'DynamicallyAccessedMembersAttribute', but that attribute can only be applied to parameters of type 'System.Type' or 'System.String'.
\Marshalers.cs(550,31,550,134): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(1222,31,1222,36): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>(Guid)'. The generic parameter 'V' of 'WinRT.MarshalInspectable<T>.CreateMarshaler<V>(T, Guid, Boolean)' 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.
\Marshalers.cs(1235,40,1235,55): warning IL2098: Parameter 'o' of method 'WinRT.MarshalInspectable<T>.CreateMarshaler(T, Boolean)' has 'DynamicallyAccessedMembersAttribute', but that attribute can only be applied to parameters of type 'System.Type' or 'System.String'.
\Marshalers.cs(1116,20,1116,41): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.MarshalInterface<T>' 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.
\Marshalers.cs(559,32,559,136): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(1247,44,1247,60): warning IL2098: Parameter 'o' of method 'WinRT.MarshalInspectable<T>.CreateMarshaler2(T, Guid, Boolean)' has 'DynamicallyAccessedMembersAttribute', but that attribute can only be applied to parameters of type 'System.Type' or 'System.String'.
\Marshalers.cs(1277,44,1277,60): warning IL2098: Parameter 'o' of method 'WinRT.MarshalInspectable<T>.CreateMarshaler2(T, Boolean)' has 'DynamicallyAccessedMembersAttribute', but that attribute can only be applied to parameters of type 'System.Type' or 'System.String'.
\Marshalers.cs(568,36,568,144): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(577,41,577,154): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(586,35,586,142): warning IL2080: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The field 'WinRT.MarshalGeneric<T>.HelperType' 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.
\Marshalers.cs(1180,41,1180,62): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.MarshalInterface<T>' 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.
\Marshalers.cs(1187,31,1187,52): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.MarshalInterface<T>' 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.
\Marshalers.cs(1418,43,1418,67): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ComWrappersSupport.CreateRcwForComObject<T>(IntPtr)'. The generic parameter 'T' of 'WinRT.MarshalDelegate.FromAbi<T>(IntPtr)' 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.
\Marshalers.cs(1180,34,1180,146): warning IL2111: Method 'WinRT.MarshalInspectable<T>.CreateMarshaler<V>(T, Guid, Boolean)' with parameters or return value with `DynamicallyAccessedMembersAttribute` is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method.
\Marshalers.cs(1180,34,1180,146): warning IL2111: Method 'WinRT.MarshalInspectable<T>.CreateMarshaler(T, Boolean)' with parameters or return value with `DynamicallyAccessedMembersAttribute` is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method.
\Projections.cs(341,30,341,70): warning IL2055: Call to 'System.Type.MakeGenericType(params Type[])' can not be statically analyzed. It's not possible to guarantee the availability of requirements of the generic type.
\Projections.cs(349,35,349,55): warning IL2070: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.Interfaces' in call to 'System.Type.GetInterfaces()'. The parameter 'type' of method 'WinRT.Projections.GetCompatibleTypes(Type, Stack<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.
\Projections\PropertyChangedEventArgs.cs(40,16,40,34): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in 'WinRT.ObjectReference<T>'. The generic parameter 'I' of 'ABI.Microsoft.UI.Xaml.Data.WinRTPropertyChangedEventArgsRuntimeClassFactory.AsInterface<I>()' 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.
\Projections\PropertyChangedEventArgs.cs(40,60,40,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.PublicFields' in 'WinRT.IObjectReference.As<T>()'. The generic parameter 'I' of 'ABI.Microsoft.UI.Xaml.Data.WinRTPropertyChangedEventArgsRuntimeClassFactory.AsInterface<I>()' 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.
\Projections.cs(405,35,405,78): warning IL2055: Call to 'System.Type.MakeGenericType(params Type[])' can not be statically analyzed. It's not possible to guarantee the availability of requirements of the generic type.
\Projections.cs(490,28,490,181): warning IL2070: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Type.GetProperty(String, BindingFlags)'. The parameter 'runtimeClass' of method 'lambda expression' 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.
\Marshalers.cs(1618,48,1618,69): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.Marshaler<T>' 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.
\Marshalers.cs(1621,21,1621,42): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.Marshaler<T>' 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.
\Marshalers.cs(1621,65,1621,86): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.Marshaler<T>' 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.
\Marshalers.cs(1622,43,1622,64): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.Marshaler<T>' 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.
\Marshalers.cs(1623,44,1623,65): warning IL2091: 'T' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicConstructors', 'DynamicallyAccessedMemberTypes.Interfaces' in 'WinRT.MarshalInspectable<T>'. The generic parameter 'T' of 'WinRT.Marshaler<T>' 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.
[...]

[!NOTE] Had to skip some at the end as they couldn't fit in the issue description 😅

Sergio0694 avatar Aug 18 '23 17:08 Sergio0694

Looking at this, it seems that there are non-trimming related warnings mixed in as well?

dongle-the-gadget avatar Aug 25 '23 12:08 dongle-the-gadget

With some of the changes I have upcoming for AOT, I would expect some of these trim warnings can become unused scenarios due to alternate code paths to handle them. So, I am planning on holding off on going through them individually until I have some of my upcoming changes to generate more source in PR.

Looking at this, it seems that there are non-trimming related warnings mixed in as well?

It does seem some of them in the list are non-trim warnings especially the DynamicInterfaceImplementationAttribute ones.

manodasanW avatar Aug 25 '23 17:08 manodasanW