Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The .NET binary size is too large #109

Closed
JeyJeyGao opened this issue May 9, 2023 · 6 comments
Closed

The .NET binary size is too large #109

JeyJeyGao opened this issue May 9, 2023 · 6 comments

Comments

@JeyJeyGao
Copy link
Collaborator

JeyJeyGao commented May 9, 2023

The .NET version plugin binary size is over 60 MB. We need to reduce the size by using trimming unused code feature of .NET, however, it will trigger many warnings:

  1. JSON serializer warning which can be fixed by us:
notation-azure-kv/Notation.Plugin.AzureKeyVault/Command/DescribeKey.cs(22,27): warning IL2026: Using member 'System.Text.Json.JsonSerializer.Deserialize<Notation.Plugin.Protocol.DescribeKeyRequest>(string, System.Text.Json.JsonSerializerOptions?)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
notation-azure-kv/Notation.Plugin.AzureKeyVault/Command/GenerateSignature.cs(23,27): warning IL2026: Using member 'System.Text.Json.JsonSerializer.Deserialize<Notation.Plugin.Protocol.GenerateSignatureRequest>(string, System.Text.Json.JsonSerializerOptions?)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
notation-azure-kv/Notation.Plugin.AzureKeyVault/Protocol/PluginIO.cs(47,33): warning IL2026: Using member 'System.Text.Json.JsonSerializer.Serialize<object>(object, System.Text.Json.JsonSerializerOptions?)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
notation-azure-kv/Notation.Plugin.AzureKeyVault/Command/DescribeKey.cs(22,13): Trim analysis warning IL2026: Notation.Plugin.AzureKeyVault.Command.DescribeKey.DescribeKey(String): Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
notation-azure-kv/Notation.Plugin.AzureKeyVault/Command/GenerateSignature.cs(23,13): Trim analysis warning IL2026: Notation.Plugin.AzureKeyVault.Command.GenerateSignature.GenerateSignature(String): Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
notation-azure-kv/Notation.Plugin.AzureKeyVault/Protocol/PluginIO.cs(47,13): Trim analysis warning IL2026: Notation.Plugin.Protocol.PluginIO.WriteOutput(Object,Boolean): Using member 'System.Text.Json.JsonSerializer.Serialize<TValue>(TValue,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
  1. Azure library warnings:
ILLink : Trim analysis warning IL2026: Azure.Core.Serialization.JsonObjectSerializer.<SerializeAsync>d__11.MoveNext(): Using member 'System.Text.Json.JsonSerializer.SerializeAsync(Stream,Object,Type,JsonSerializerOptions,CancellationToken)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.MarkFailed(Exception): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Start(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceHasListeners(Object): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityLinkType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.CreateActivitySource(String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Activator.CreateInstance(Type,Object[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateTagsCollection(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityTagsCollectionType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.ErrorResponse(String,Int32,String,String,Double): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.ErrorResponseContent(String,Byte[]): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.ErrorResponseContentBlock(String,Int32,Byte[]): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.ErrorResponseContentTextBlock(String,Int32,String): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.Request(String,String,String,String,String): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.RequestContent(String,Byte[]): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.RequestRedirect(String,String,String,Int32): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.RequestRetrying(String,Int32,Double): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.Response(String,Int32,String,String,Double): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.ResponseContent(String,Byte[]): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.ResponseContentBlock(String,Int32,Byte[]): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.ResponseContentTextBlock(String,Int32,String): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Diagnostics.AzureCoreEventSource.ResponseDelay(String,Double): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.ClientDiagnostics.ExtractAzureErrorContent(String): Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2075: Azure.Core.Pipeline.ClientDiagnostics.GetResourceProviderNamespace(Assembly): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperty(String)'. 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2075: Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.HttpPipelineSynchronousPolicy(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Serialization.JsonObjectSerializer.Deserialize(Stream,Type,CancellationToken): Using member 'System.Text.Json.JsonSerializer.Deserialize(ReadOnlySpan<Byte>,Type,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Serialization.JsonObjectSerializer.DeserializeAsync(Stream,Type,CancellationToken): Using member 'System.Text.Json.JsonSerializer.DeserializeAsync(Stream,Type,JsonSerializerOptions,CancellationToken)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Serialization.JsonObjectSerializer.Serialize(Stream,Object,Type,CancellationToken): Using member 'System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(Object,Type,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Serialization.JsonObjectSerializer.SerializeToBinaryDataInternal(Object,Type): Using member 'System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(Object,Type,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.RequestFailedException.TryExtractErrorContent(Response,ResponseError&,IDictionary`2&): Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.MarkFailed(Exception): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Start(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceHasListeners(Object): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityLinkType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.CreateActivitySource(String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Activator.CreateInstance(Type,Object[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateTagsCollection(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityTagsCollectionType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Identity.AzureIdentityEventSource.AuthenticatedAccountDetails(String,String,String,String): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Identity.AzureIdentityEventSource.GetTokenFailed(String,String,String,String): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Identity.AzureIdentityEventSource.GetTokenSucceeded(String,String,String,String): Using member 'System.Diagnostics.Tracing.EventSource.WriteEvent(Int32,Object[])' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.ClientDiagnostics.ExtractAzureErrorContent(String): Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2075: Azure.Core.Pipeline.ClientDiagnostics.GetResourceProviderNamespace(Assembly): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperty(String)'. 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.MarkFailed(Exception): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Start(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceHasListeners(Object): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityLinkType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.CreateActivitySource(String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Activator.CreateInstance(Type,Object[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateTagsCollection(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityTagsCollectionType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.ClientDiagnostics.ExtractAzureErrorContent(String): Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2075: Azure.Core.Pipeline.ClientDiagnostics.GetResourceProviderNamespace(Assembly): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperty(String)'. 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2075: Azure.Core.LightweightPkcs8Decoder.ECCurveProxy.ExportFromPublicKey(ECDsa): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in call to 'System.Type.GetField(String,BindingFlags)'. The return value of method 'System.Reflection.MethodInfo.ReturnType.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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.LightweightPkcs8Decoder.ECParametersProxy.ToECDsa(): Using member 'System.Reflection.Assembly.GetType(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.MarkFailed(Exception): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Start(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceHasListeners(Object): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityLinkType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.CreateActivitySource(String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Activator.CreateInstance(Type,Object[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateTagsCollection(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityTagsCollectionType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.ClientDiagnostics.ExtractAzureErrorContent(String): Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2075: Azure.Core.Pipeline.ClientDiagnostics.GetResourceProviderNamespace(Assembly): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperty(String)'. 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Security.KeyVault.Keys.JsonWebKey.CreateRSAProvider(RSAParameters): Using member 'System.Security.Cryptography.AsymmetricAlgorithm.Create(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Security.KeyVault.Keys.JsonWebKey.CreateRSAProvider(RSAParameters): Using member 'System.Security.Cryptography.RSA.Create(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.MarkFailed(Exception): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Start(): Using member 'System.Diagnostics.DiagnosticSource.Write(String,Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. The type of object being written to DiagnosticSource cannot be discovered statically. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceHasListeners(Object): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags,Binder,Type[],ParameterModifier[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.ActivitySourceStartActivity(Object,String,Int32,DateTimeOffset,ICollection<KeyValuePair<String,Object>>,IList,String,String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Activator.CreateInstance(Type)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicMethods' in call to 'System.Type.GetMethod(String,BindingFlags)'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityContextType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateActivityLink(String,String,ICollection<KeyValuePair<String,Object>>): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityLinkType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2077: Azure.Core.Pipeline.ActivityExtensions.CreateActivitySource(String): '#0' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in call to 'System.Activator.CreateInstance(Type,Object[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivitySourceType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2080: Azure.Core.Pipeline.ActivityExtensions.CreateTagsCollection(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.GetConstructor(Type[])'. The field 'Azure.Core.Pipeline.ActivityExtensions.ActivityTagsCollectionType' 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: Azure.Core.Pipeline.ClientDiagnostics.ExtractAzureErrorContent(String): Using member 'System.Text.Json.JsonSerializer.Deserialize<TValue>(String,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2075: Azure.Core.Pipeline.ClientDiagnostics.GetResourceProviderNamespace(Assembly): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperty(String)'. 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. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: System.BinaryData.BinaryData(Object,JsonSerializerOptions,Type): Using member 'System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(Object,Type,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: System.BinaryData.FromObjectAsJson<T>(T,JsonSerializerOptions): Using member 'System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(Object,Type,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
ILLink : Trim analysis warning IL2026: System.BinaryData.ToObjectFromJson<T>(JsonSerializerOptions): Using member 'System.Text.Json.JsonSerializer.Deserialize(ReadOnlySpan<Byte>,Type,JsonSerializerOptions)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved. [notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]

Here is a related issue in azure-sdk-for-dotnet repository

shizhMSFT pushed a commit that referenced this issue May 9, 2023
- optimize the JSON serializer with generated code
- remove part of warning for trim unused code
- optimize binary load time

Resolve part of #109 

Signed-off-by: Junjie Gao <[email protected]>
@JeyJeyGao
Copy link
Collaborator Author

JeyJeyGao commented Aug 7, 2023

Here is the latest status of .NET 8 AOT feature support
[Core] Tracking work to resolve Native AOT warnings in Azure.Core #37761

@m-redding
Copy link
Member

Hi @JeyJeyGao the work we have planned for now for AOT support in the Azure SDK's is mostly complete. If any of the warnings you have listed here are still impacting you, would you mind opening an issue in our repo - https://github.com/Azure/azure-sdk-for-net

@JeyJeyGao
Copy link
Collaborator Author

Hi @m-redding , thank you for sharing the good news! Will Azure.Core and Azure.Security.KeyVault be publishing new versions to include the update?

@JeyJeyGao
Copy link
Collaborator Author

Azure/azure-sdk-for-net#40892
Azure/azure-sdk-for-net@bab8b0a

The warning message in keyvault library has been fixed but didn't release.

@JeyJeyGao
Copy link
Collaborator Author

Azure/azure-sdk-for-net#40892 (comment)

Warnings have been almost fixed. Waiting for release.

@JeyJeyGao
Copy link
Collaborator Author

Resolved in #156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants