question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Epic - Make WinForms trim compatible

See original GitHub issue

Linked to this epic

Right now winforms produces many linker warnings (some of them in the core framework, which will be handled separately). To provide linker compatibility, these warnings should be reviewed.

The trim warnings for the basic template app are:

ILLink : Trim analysis warning IL2075: System.ComponentModel.AttributeCollection.GetDefaultAttribute(Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'System.Type.GetField(String,BindingFlags)'. The return value of method 'System.ComponentModel.TypeDescriptor.GetReflectionType(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.AttributeCollection.GetDefaultAttribute(Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.GetConstructor(Type[])'. The return value of method 'System.ComponentModel.TypeDescriptor.GetReflectionType(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2026: System.ComponentModel.TypeDescriptor.ComNativeDescriptorProxy.ComNativeDescriptorProxy(): Using method 'System.Reflection.Assembly.GetType(String,Boolean)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2072: System.ComponentModel.TypeDescriptor.ComNativeDescriptorProxy.ComNativeDescriptorProxy(): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Object System.Activator::CreateInstance(System.Type)'. The return value of method 'System.Reflection.Assembly.GetType(String,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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ComponentResourceManager.ApplyResources(Object,String,CultureInfo): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperty(String,BindingFlags)'. The return value of method 'System.Object.GetType()' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2026: System.ComponentModel.Design.DesigntimeLicenseContextSerializer.Deserialize(Stream,String,RuntimeLicenseContext): Using method 'System.Runtime.Serialization.IFormatter.Deserialize(Stream)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. BinaryFormatter serialization is not trim compatible because the Type of objects being processed cannot be statically discovered.. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.EnumConverter.ConvertTo(ITypeDescriptorContext,CultureInfo,Object,Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'System.Type.GetField(String)'. The return value of method 'System.ComponentModel.EnumConverter.EnumType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.EnumConverter.GetStandardValues(ITypeDescriptorContext): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields', 'DynamicallyAccessedMemberTypes.NonPublicFields' in call to 'System.Type.GetFields(BindingFlags)'. The return value of method 'System.ComponentModel.EnumConverter.EnumType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]

ILLink : Trim analysis warning IL2067: System.ComponentModel.LicenseManager.CreateWithContext(Type,LicenseContext,Object[]): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Object System.Activator::CreateInstance(System.Type,System.Object[])'. The parameter 'type' of method 'System.ComponentModel.LicenseManager.CreateWithContext(Type,LicenseContext,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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2072: System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext,Type,Object,Boolean,License&,String&): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Object System.Activator::CreateInstance(System.Type)'. The return value of method 'System.ComponentModel.LicenseProviderAttribute.LicenseProvider.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.ComponentModel.MemberDescriptor.FindMethod(Type,String,Type[],Type,Boolean): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,Type[])'. The parameter 'componentClass' of method 'System.ComponentModel.MemberDescriptor.FindMethod(Type,String,Type[],Type,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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.ComponentModel.MemberDescriptor.FindMethod(Type,String,Type[],Type,Boolean): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The parameter 'componentClass' of method 'System.ComponentModel.MemberDescriptor.FindMethod(Type,String,Type[],Type,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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.NullableConverter.ConvertTo(ITypeDescriptorContext,CultureInfo,Object,Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The return value of method 'System.ComponentModel.NullableConverter.NullableType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.ComponentModel.PropertyDescriptor.CreateInstance(Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The parameter 'type' of method 'System.ComponentModel.PropertyDescriptor.CreateInstance(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2057: System.ComponentModel.PropertyDescriptor.GetTypeFromName(String): 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2026: System.ComponentModel.PropertyDescriptor.GetTypeFromName(String): Using method 'System.Reflection.Assembly.GetType(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2026: System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetTypeFromName(String): Using method 'System.Reflection.Assembly.GetType(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2057: System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetTypeFromName(String): 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2057: System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetTypeFromName(String): 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectEventDescriptor.FillEventInfoAttribute(EventInfo,IList): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicEvents' in call to 'System.Type.GetEvent(String,BindingFlags)'. The return value of method 'System.Reflection.MemberInfo.ReflectedType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.ComponentModel.ReflectEventDescriptor.FillMethods(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicEvents' in call to 'System.Type.GetEvent(String)'. The field 'System.Type System.ComponentModel.ReflectEventDescriptor::_componentClass' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectEventDescriptor.FillMethods(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicEvents', 'DynamicallyAccessedMemberTypes.NonPublicEvents' in call to 'System.Type.GetEvent(String,BindingFlags)'. The return value of method 'System.Type.BaseType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectEventDescriptor.FillSingleMethodAttribute(MethodInfo,IList): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The return value of method 'System.Reflection.MemberInfo.ReflectedType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectPropertyDescriptor.FillAttributes(IList): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors', 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.PublicFields', 'DynamicallyAccessedMemberTypes.PublicNestedTypes', 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.PublicEvents' in call to 'System.Type.GetMember(String)'. The return value of method 'System.Type.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2057: System.ComponentModel.ReflectPropertyDescriptor.FillAttributes(IList): 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.ComponentModel.ReflectPropertyDescriptor.FillAttributes(IList): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Type.GetProperty(String,BindingFlags,Binder,Type,Type[],ParameterModifier[])'. The field 'System.Type System.ComponentModel.ReflectPropertyDescriptor::_componentClass' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectPropertyDescriptor.FillAttributes(IList): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The return value of method 'System.Type.BaseType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectPropertyDescriptor.FillAttributes(IList): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Type.GetProperty(String,BindingFlags,Binder,Type,Type[],ParameterModifier[])'. The return value of method 'System.Type.BaseType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.ComponentModel.ReflectPropertyDescriptor.FillAttributes(IList): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The field 'System.Type System.ComponentModel.ReflectPropertyDescriptor::_componentClass' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.ComponentModel.ReflectPropertyDescriptor.GetMethodValue.get: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Type.GetProperty(String,BindingFlags,Binder,Type,Type[],ParameterModifier[])'. The field 'System.Type System.ComponentModel.ReflectPropertyDescriptor::_componentClass' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.ComponentModel.ReflectPropertyDescriptor.SetMethodValue.get: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Type.GetProperty(String,BindingFlags,Binder,Type,Type[],ParameterModifier[])'. The field 'System.Type System.ComponentModel.ReflectPropertyDescriptor::_componentClass' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectPropertyDescriptor.SetMethodValue.get: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperty(String,BindingFlags,Binder,Type,Type[],ParameterModifier[])'. The return value of method 'System.Type.BaseType.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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(Type,Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The parameter 'objectType' of method 'System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2067: System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(Type,Type): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Object System.Activator::CreateInstance(System.Type)'. The parameter 'objectType' of method 'System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(IServiceProvider,Type,Type[],Object[]): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The parameter 'objectType' of method 'System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(IServiceProvider,Type,Type[],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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(IServiceProvider,Type,Type[],Object[]): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The parameter 'objectType' of method 'System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(IServiceProvider,Type,Type[],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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2067: System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(IServiceProvider,Type,Type[],Object[]): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Object System.Activator::CreateInstance(System.Type,System.Object[])'. The parameter 'objectType' of method 'System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(IServiceProvider,Type,Type[],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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2057: System.ComponentModel.ReflectTypeDescriptionProvider.GetTypeFromName(String): 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2057: System.ComponentModel.ReflectTypeDescriptionProvider.GetTypeFromName(String): 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetEvents(Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicEvents', 'DynamicallyAccessedMemberTypes.NonPublicEvents' in call to 'System.Type.GetEvents(BindingFlags)'. The parameter 'type' of method 'System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetEvents(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetExtendedProperties(IExtenderProvider): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,Type[])'. The return value of method 'System.Object.GetType()' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetExtendedProperties(IExtenderProvider): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,Type[])'. The return value of method 'System.Object.GetType()' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetProperties(Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Type.GetProperties(BindingFlags)'. The parameter 'type' of method 'System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetProperties(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2067: System.ComponentModel.TypeDescriptionProvider.CreateInstance(IServiceProvider,Type,Type[],Object[]): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Object System.Activator::CreateInstance(System.Type,System.Object[])'. The parameter 'objectType' of method 'System.ComponentModel.TypeDescriptionProvider.CreateInstance(IServiceProvider,Type,Type[],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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.MakeImplicitTransforms(Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Reflection.TypeInfo.DeclaredProperties.get'. The parameter 'type' of method 'System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.MakeImplicitTransforms(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.FetcherForProperty(Type,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Reflection.TypeInfo.GetDeclaredProperty(String)'. The parameter 'type' of method 'System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.FetcherForProperty(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2026: System.Drawing.BitmapSelector.DoesAssemblyHaveCustomAttribute(Assembly,String): Using method 'System.Reflection.Assembly.GetType(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromStream(Interop.Ole32.IStream,IntPtr&): P/invoke method 'System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromStream(Interop.Ole32.IStream,IntPtr&)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromStreamICM(Interop.Ole32.IStream,IntPtr&): P/invoke method 'System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromStreamICM(Interop.Ole32.IStream,IntPtr&)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromStream(Interop.Ole32.IStream,IntPtr&): P/invoke method 'System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromStream(Interop.Ole32.IStream,IntPtr&)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromStreamICM(Interop.Ole32.IStream,IntPtr&): P/invoke method 'System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromStreamICM(Interop.Ole32.IStream,IntPtr&)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: System.Drawing.SafeNativeMethods.Gdip.GdipSaveImageToStream(HandleRef,Interop.Ole32.IStream,Guid&,HandleRef): P/invoke method 'System.Drawing.SafeNativeMethods.Gdip.GdipSaveImageToStream(HandleRef,Interop.Ole32.IStream,Guid&,HandleRef)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2050: System.Drawing.Icon.OleCreatePictureIndirect(Icon.PICTDESC,Guid&,Boolean): P/invoke method 'System.Drawing.Icon.OleCreatePictureIndirect(Icon.PICTDESC,Guid&,Boolean)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2072: System.Diagnostics.Tracing.EventSource.EnsureDescriptorsInitialized(): 'eventSourceType' argument does not satisfy 'All' in call to 'System.Diagnostics.Tracing.EventSource.CreateManifestAndDescriptors(Type,String,EventSource,EventManifestOptions)'. The return value of method 'System.Object.GetType()' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.Diagnostics.Tracing.TypeAnalysis.TypeAnalysis(Type,EventDataAttribute,List<Type>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperties()'. The parameter 'dataType' of method 'System.Diagnostics.Tracing.TypeAnalysis.TypeAnalysis(Type,EventDataAttribute,List<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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AccessibleObject.System.Reflection.IReflect.GetFields(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AccessibleObject.System.Reflection.IReflect.GetFields(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetFields(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AccessibleObject.System.Reflection.IReflect.GetMethods(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AccessibleObject.System.Reflection.IReflect.GetMethods(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetMethods(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AccessibleObject.System.Reflection.IReflect.GetProperties(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AccessibleObject.System.Reflection.IReflect.GetProperties(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetProperties(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AccessibleObject.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[]): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AccessibleObject.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.AxContainer.System.Reflection.IReflect.GetFields(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.AxContainer.System.Reflection.IReflect.GetFields(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetFields(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.AxContainer.System.Reflection.IReflect.GetMethods(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.AxContainer.System.Reflection.IReflect.GetMethods(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetMethods(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.AxContainer.System.Reflection.IReflect.GetProperties(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.AxContainer.System.Reflection.IReflect.GetProperties(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetProperties(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.AxContainer.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[]): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.AxContainer.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.AxContainer.ExtenderProxy.System.Reflection.IReflect.GetFields(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.AxContainer.ExtenderProxy.System.Reflection.IReflect.GetFields(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetFields(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.AxContainer.ExtenderProxy.System.Reflection.IReflect.GetMethods(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.AxContainer.ExtenderProxy.System.Reflection.IReflect.GetMethods(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetMethods(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.AxContainer.ExtenderProxy.System.Reflection.IReflect.GetProperties(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.AxContainer.ExtenderProxy.System.Reflection.IReflect.GetProperties(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetProperties(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.AxContainer.ExtenderProxy.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[]): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.AxContainer.ExtenderProxy.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.Windows.Forms.Formatter.InvokeStringParseMethod(Object,Type,IFormatProvider): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The parameter 'targetType' of method 'System.Windows.Forms.Formatter.InvokeStringParseMethod(Object,Type,IFormatProvider)' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.Windows.Forms.Formatter.InvokeStringParseMethod(Object,Type,IFormatProvider): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The parameter 'targetType' of method 'System.Windows.Forms.Formatter.InvokeStringParseMethod(Object,Type,IFormatProvider)' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.Windows.Forms.Formatter.InvokeStringParseMethod(Object,Type,IFormatProvider): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The parameter 'targetType' of method 'System.Windows.Forms.Formatter.InvokeStringParseMethod(Object,Type,IFormatProvider)' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.HtmlToClrEventProxy.System.Reflection.IReflect.GetFields(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.HtmlToClrEventProxy.System.Reflection.IReflect.GetFields(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetFields(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.HtmlToClrEventProxy.System.Reflection.IReflect.GetMethods(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.HtmlToClrEventProxy.System.Reflection.IReflect.GetMethods(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetMethods(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.HtmlToClrEventProxy.System.Reflection.IReflect.GetProperties(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.HtmlToClrEventProxy.System.Reflection.IReflect.GetProperties(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetProperties(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.HtmlToClrEventProxy.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[]): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.HtmlToClrEventProxy.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetFields(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetFields(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetFields(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetFields(BindingFlags): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields', 'DynamicallyAccessedMemberTypes.NonPublicFields' in call to 'System.Reflection.IReflect.GetFields(BindingFlags)'. The field 'System.Reflection.IReflect System.Windows.Forms.InternalAccessibleObject::publicIReflect' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetMethods(BindingFlags): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods', 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Reflection.IReflect.GetMethods(BindingFlags)'. The field 'System.Reflection.IReflect System.Windows.Forms.InternalAccessibleObject::publicIReflect' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetMethods(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetMethods(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetMethods(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetProperties(BindingFlags): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Reflection.IReflect.GetProperties(BindingFlags)'. The field 'System.Reflection.IReflect System.Windows.Forms.InternalAccessibleObject::publicIReflect' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetProperties(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.GetProperties(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetProperties(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2080: System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[]): 'this' argument does not satisfy 'All' in call to 'System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])'. The field 'System.Reflection.IReflect System.Windows.Forms.InternalAccessibleObject::publicIReflect' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[]): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.InternalAccessibleObject.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2067: System.Windows.Forms.ListBindingHelper.CreateInstanceOfType(Type): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Object System.Activator::CreateInstance(System.Type)'. The parameter 'type' of method 'System.Windows.Forms.ListBindingHelper.CreateInstanceOfType(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2070: System.Windows.Forms.ListBindingHelper.GetTypedIndexer(Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties', 'DynamicallyAccessedMemberTypes.NonPublicProperties' in call to 'System.Type.GetProperties(BindingFlags)'. The parameter 'type' of method 'System.Windows.Forms.ListBindingHelper.GetTypedIndexer(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.OleInterfaces.System.Reflection.IReflect.GetFields(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.OleInterfaces.System.Reflection.IReflect.GetFields(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetFields(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.OleInterfaces.System.Reflection.IReflect.GetMethods(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.OleInterfaces.System.Reflection.IReflect.GetMethods(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetMethods(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.OleInterfaces.System.Reflection.IReflect.GetProperties(BindingFlags): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.OleInterfaces.System.Reflection.IReflect.GetProperties(BindingFlags)' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.GetProperties(BindingFlags)'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2094: System.Windows.Forms.AxHost.OleInterfaces.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[]): 'DynamicallyAccessedMemberTypes' in 'DynamicallyAccessedMembersAttribute' on the implicit 'this' parameter of method 'System.Windows.Forms.AxHost.OleInterfaces.System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])' don't match overridden implicit 'this' parameter of method 'System.Reflection.IReflect.InvokeMember(String,BindingFlags,Binder,Object,Object[],ParameterModifier[],CultureInfo,String[])'. All overridden members must have the same 'DynamicallyAccessedMembersAttribute' usage. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.Windows.Forms.TableLayoutSettings.StyleConverter.ConvertTo(ITypeDescriptorContext,CultureInfo,Object,Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The return value of method 'System.Object.GetType()' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2075: System.Windows.Forms.TableLayoutSettings.StyleConverter.ConvertTo(ITypeDescriptorContext,CultureInfo,Object,Type): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.GetConstructor(Type[])'. The return value of method 'System.Object.GetType()' 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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2067: System.Windows.Forms.Message.GetLParam(Type): 'structureType' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Runtime.InteropServices.Marshal.PtrToStructure(IntPtr,Type)'. The parameter 'cls' of method 'System.Windows.Forms.Message.GetLParam(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. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: .Interop.Ole32.CoCreateInstance(Guid&,IntPtr,Interop.Ole32.CLSCTX,Guid&,Object&): P/invoke method '.Interop.Ole32.CoCreateInstance(Guid&,IntPtr,Interop.Ole32.CLSCTX,Guid&,Object&)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: .Interop.Ole32.DoDragDrop(IDataObject,Interop.Ole32.IDropSource,Interop.Ole32.DROPEFFECT,DROPEFFECT&): P/invoke method '.Interop.Ole32.DoDragDrop(IDataObject,Interop.Ole32.IDropSource,Interop.Ole32.DROPEFFECT,DROPEFFECT&)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2050: .Interop.Ole32.OleCreatePictureIndirect(PICTDESC*,Guid&,Interop.BOOL): P/invoke method '.Interop.Ole32.OleCreatePictureIndirect(PICTDESC*,Guid&,Interop.BOOL)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: .Interop.Ole32.RegisterDragDrop(IntPtr,Interop.Ole32.IDropTarget): P/invoke method '.Interop.Ole32.RegisterDragDrop(IntPtr,Interop.Ole32.IDropTarget)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : Trim analysis warning IL2050: .Interop.Oleaut32.OleCreateFontIndirect(FONTDESC&,Guid&): P/invoke method '.Interop.Oleaut32.OleCreateFontIndirect(FONTDESC&,Guid&)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: .Interop.UiaCore.UiaDisconnectProvider(Interop.UiaCore.IRawElementProviderSimple): P/invoke method '.Interop.UiaCore.UiaDisconnectProvider(Interop.UiaCore.IRawElementProviderSimple)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: .Interop.UiaCore.UiaRaiseAutomationEvent(Interop.UiaCore.IRawElementProviderSimple,Interop.UiaCore.UIA): P/invoke method '.Interop.UiaCore.UiaRaiseAutomationEvent(Interop.UiaCore.IRawElementProviderSimple,Interop.UiaCore.UIA)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: .Interop.UiaCore.UiaRaiseAutomationPropertyChangedEvent(Interop.UiaCore.IRawElementProviderSimple,Interop.UiaCore.UIA,Object,Object): P/invoke method '.Interop.UiaCore.UiaRaiseAutomationPropertyChangedEvent(Interop.UiaCore.IRawElementProviderSimple,Interop.UiaCore.UIA,Object,Object)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: .Interop.UiaCore.UiaRaiseNotificationEvent(Interop.UiaCore.IRawElementProviderSimple,AutomationNotificationKind,AutomationNotificationProcessing,String,String): P/invoke method '.Interop.UiaCore.UiaRaiseNotificationEvent(Interop.UiaCore.IRawElementProviderSimple,AutomationNotificationKind,AutomationNotificationProcessing,String,String)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: .Interop.UiaCore.UiaReturnRawElementProvider(IntPtr,IntPtr,IntPtr,Interop.UiaCore.IRawElementProviderSimple): P/invoke method '.Interop.UiaCore.UiaReturnRawElementProvider(IntPtr,IntPtr,IntPtr,Interop.UiaCore.IRawElementProviderSimple)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]
ILLink : warning IL2050: System.Windows.Forms.UnsafeNativeMethods.CreateStdAccessibleObject(HandleRef,Int32,Guid&,Object&): P/invoke method 'System.Windows.Forms.UnsafeNativeMethods.CreateStdAccessibleObject(HandleRef,Int32,Guid&,Object&)' declares a parameter with COM marshalling. Correctness of COM interop cannot be guaranteed after trimming. Interfaces and interface members might be removed. [C:\Users\andy\tmp\winforms\winforms.csproj]

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:8
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
mikola-akbalcommented, Jul 25, 2023

Can you estimate when Native AOT will support Windows Forms? Time or version of .NET.

1reaction
mikola-akbalcommented, Jul 10, 2023

Please, make Windows Forms compatible with trimming.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known trimming incompatibilities - .NET
There are some patterns that are known to be incompatible with trimming. Some of these patterns may become compatible as tooling improves or ......
Read more >
Intro to Windows Forms (WinForms) in .NET 6
Windows Forms, also known as WinForms, is one of the original project types in .NET. It is designed to be a rapid application...
Read more >
Creating a Windows Forms Application in C# using `dotnet ...
I am trying to create a (simple) windows form application in Visual Studio Code 2017. Sadly I am unable to use the full...
Read more >
What is your opinion about WIN FORMS? : r/csharp
True that WinForms does not enforce a design pattern but I have written WinForm applications using the MVP, MVC and MVVM patterns with...
Read more >
Completion percentage on Epic and Feature boards
As with rollup columns, the board's view should show percentages of completion in the Epic and Feature views. This would help to have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found