You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Investigate how to resolve warnings from DynamicData.Equals() and MutableJsonElement.ToString(). They cannot have the "RequiresUnreferencedCode" attribute because the attribute must exist on the method being overridden
Marked relevant classes as RequiresUnreferencedCode
Opened issue since RequiresUnreferencedCode cannot be applied to structs - currently no workaround
m-redding
changed the title
[Core] Tracking work to resolve Native AOT warnings in Azure.Core
[Core] Tracking work to resolve some Native AOT warnings in Azure.Core
Aug 14, 2023
m-redding
changed the title
[Core] Tracking work to resolve some Native AOT warnings in Azure.Core
[Core] Resolve Azure.Core AOT warnings impacting the AOT compatibility of Azure.Monitor.OpenTelemetry.Exporter
Aug 15, 2023
Hello @m-redding , looks like there is still a trim warning for Azure.Core when build with AOT enabled.
Warnings:
/home/jj/.nuget/packages/azure.core/1.36.0/lib/net6.0/Azure.Core.dll : warning IL2104: Assembly 'Azure.Core' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/home/jj/projects/junjie/notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
/home/jj/.nuget/packages/azure.security.keyvault.keys/4.6.0-beta.2/lib/netstandard2.0/Azure.Security.KeyVault.Keys.dll : warning IL2104: Assembly 'Azure.Security.KeyVault.Keys' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/home/jj/projects/junjie/notation-azure-kv/Notation.Plugin.AzureKeyVault/Notation.Plugin.AzureKeyVault.csproj]
Could you tell me how to fix it? Dotnet 8 stable version was released and we are going to bump up to Dotnet 8 with AOT enabled.
Hey @JeyJeyGao I have been looking into this and I can see a couple new warnings which I am working on getting addressed. Just as a note, the warning coming from Azure.Core is because of a warning suppression that is missing so as long as it's just that one you're seeing then the code is still safe for trimming. On the KeyVault side, this is coming from a trimming update in .NET 8 that is different from .NET 8 RC2. I don't think the code is actually trim-incompatible here either, I need to confirm but I think this will also just be a suppression as well.
Library name
Azure.Core
Please describe the feature.
This issue is tracking the work needed to resolve #35572
System.Diagnostics.DiagnosticSource
to 6.0.1System.Diagnostics.DiagnosticSource
#37418RequestFailedException
to use source generation for deserialization.DiagnosticSource.Write
needs type to work with trimming #37733 - adding this work to the PRRequiresUnreferencedCode
RequiresUnreferencedCode
cannot be applied to structs - currently no workaroundThe text was updated successfully, but these errors were encountered: