DelegatingOptionsFactoryServiceCollectionExtensions breaks native AoT compatibility #5518
Labels
bug
Something isn't working
pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol
Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Milestone
Bug Report
List of all OpenTelemetry NuGet packages and version that you are using (e.g.
OpenTelemetry 1.0.2
):Runtime version:
net9.0
Symptom
Compiling a native AoT application with .NET 9 preview 2 fails when OpenTelemetry 1.8.0 is used in the application.
What is the expected behavior?
The application successfully compiles.
What is the actual behavior?
The application fails to compile due to warnings associated with the
DelegatingOptionsFactoryServiceCollectionExtensions
type:This doesn't occur with .NET 8 - unless there's a bug with the native AoT compiler, my assumption is that new annotations have been added to the runtime in .NET 9 which create new warnings/incompatibilities.
Reproduce
Originally found with martincostello/alexa-london-travel@3a0e406 with
/p:TrimmerSingleWarn=false
.For a simpler repro see
verify-aot-compat
failures in #5519 (example).Additional Context
None.
/cc @eerhardt
The text was updated successfully, but these errors were encountered: