-
Notifications
You must be signed in to change notification settings - Fork 302
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
[bug] Instrumentation packages reference .NET 9 framework assemblies #2361
Comments
Tagging component owner(s). |
Using https://www.nuget.org/packages/microsoft.extensions.configuration/#supportedframeworks-body-tab |
@david-chandler-cko - can you elaborate further on your setup? Looking at the GitHub Actions, |
Hi @ppittle and @Dreamescaper, thanks for your replies. There's nothing inherently wrong or broken, but we are targeting .NET 8 as it's the LTS version of .NET. This transitive dependency forces us to update the Microsoft SDK libraries to the 9.0 major version as semantic versioning treats the 8.0 to 9.0 upgrade as a breaking change. Since nothing in the AWS contrib actually needs anything new in 9.0 when targeting .NET 8 it should be possible to avoid this breaking change by making the major version align with the .NET version (e.g.,
It's not a huge deal but I wondered if it was intentional? |
@david-chandler-cko - I'm afraid I still don't grok your issue. For background, the version of System.Text.Json has special handling depending on which target is being built (ie 4.7.2, 6, 8 or 9):
The handling of System.Text.Json has been pretty intentional. For example, have a look at this PR: #2196 To be honest, I don't fully understand it. If you want a more in-depth understanding, I'd recommend pinging @CodeBlanch on the [Open Telemetry Slack] or asking in the |
We were trying to build a .NET 8 project using ReadyToRun. If we attempt to target .NET 9 assemblies then at runtime the application fails with an MVID mismatch error because the version of the Microsoft.Extensions.Configuration.Abstractions.dll assembly referenced by the Otel AWS contrib library references a > 9.0 version and the framework supplies an 8.x version. Even if you explicitly reference the 9.x version of the Abstractions.dll the linker excludes this when publishing the app - not sure why. My mention of System.Text.Json was to point out that for .net8 you reference an 8.x version and for .net9 you reference a 9.x version. My suggestion is that this what a consumer should expect; if you target .net8, it should reference Microsoft.Extensions.*.dll 8.x. |
Component
OpenTelemetry.Instrumentation.AWS
Package Version
Runtime Version
net8.0
Description
The common package versions have been updated for OpenTelemetry.NET and they now specify a minimum version of 9.0 for Microsoft.Extensions packages.
This means that projects targeting earlier framework versions can no longer be built using the .NET 8 SDK.
Steps to Reproduce
Try to include OpenTelemetry.Instrumentation.AWS library at version 1.10.0-beta.1 in a project targeting .net 8.
Expected Result
The library should target the extensions libraries with the same major version as the current .NET framework.
Actual Result
The library requires a reference to .NET 9 framework assemblies.
Additional Context
No response
The text was updated successfully, but these errors were encountered: