Skip to content

Commit 19dda39

Browse files
martincostellorajkumar-rangarajKielek
authored
[Infra] Match runtime packages to runtime major version (#6327)
Co-authored-by: Rajkumar Rangaraj <[email protected]> Co-authored-by: Piotr Kiełkowicz <[email protected]>
1 parent fb89b7a commit 19dda39

File tree

11 files changed

+86
-23
lines changed

11 files changed

+86
-23
lines changed

Directory.Packages.props

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,46 @@
66
</PropertyGroup>
77

88
<!--
9-
This section covers packages that are directly referenced by the NuGet packages published from this repository.
10-
Any security vulnerability in these packages or their downstream dependencies will be considered as a security
11-
vulnerability in the NuGet packages that are published from this repository.
9+
For modern .NET runtimes, match the major version of packages to the major version of the runtime.
10+
This is to ensure that the NuGet packages that users deploy match the support lifetimes of the .NET version they are using (i.e. LTS vs STS).
11+
See https://github.com/open-telemetry/opentelemetry-dotnet/issues/5973 for more details.
1212
-->
1313
<ItemGroup>
14-
<!--
15-
Typically, for the Microsoft.Extensions.* packages relating to DI Abstractions, Hosting Abstractions, and Logging,
16-
the latest stable version should be used because:
17-
1) Each major version bump will have some new API capabilities (e.g.For Logging, .NET 6 introduced compile-time logging
18-
source generation, .NET 8 introduced automatic event id generation).
19-
2) Each minor version bump is normally security hotfixes or critical bug fixes.
20-
3) Since version 3.1.0, the .NET runtime team is holding a high bar for backward compatibility on
21-
these packages even during major version bumps, so compatibility is not a concern here.
22-
-->
14+
<!-- Default to latest versions for all TFMs -->
2315
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[9.0.0,)" />
2416
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Abstractions" Version="[9.0.0,)" />
2517
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="[9.0.0,)" />
2618
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="[9.0.0,)" />
19+
</ItemGroup>
20+
<!-- Version overrides for specific netX.0 TFMs -->
21+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
22+
<PackageVersion Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8.0.0,)" />
23+
<PackageVersion Update="Microsoft.Extensions.Diagnostics.Abstractions" Version="[8.0.0,)" />
24+
<PackageVersion Update="Microsoft.Extensions.Hosting.Abstractions" Version="[8.0.0,)" />
25+
<PackageVersion Update="Microsoft.Extensions.Logging.Configuration" Version="[8.0.0,)" />
26+
</ItemGroup>
27+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
28+
<PackageVersion Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[9.0.0,)" />
29+
<PackageVersion Update="Microsoft.Extensions.Diagnostics.Abstractions" Version="[9.0.0,)" />
30+
<PackageVersion Update="Microsoft.Extensions.Hosting.Abstractions" Version="[9.0.0,)" />
31+
<PackageVersion Update="Microsoft.Extensions.Logging.Configuration" Version="[9.0.0,)" />
32+
</ItemGroup>
33+
34+
<!--
35+
System.Diagnostics.DiagnosticSource is exempted from the requirement to match the major version of
36+
the runtime so that new APIs and/or semantic conventions are available to all versions of .NET.
37+
See https://github.com/open-telemetry/opentelemetry-dotnet/issues/5973 for more details.
38+
-->
39+
<ItemGroup>
40+
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="[9.0.0,)" />
41+
</ItemGroup>
2742

43+
<!--
44+
This section covers packages that are directly referenced by the NuGet packages published from this repository.
45+
Any security vulnerability in these packages or their downstream dependencies will be considered as a security
46+
vulnerability in the NuGet packages that are published from this repository.
47+
-->
48+
<ItemGroup>
2849
<!--
2950
OTel packages always point to latest stable release.
3051
-->
@@ -35,17 +56,6 @@
3556
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="[$(OTelLatestStableVer),2.0)" />
3657
<PackageVersion Include="OpenTelemetry.Extensions.Propagators" Version="[$(OTelLatestStableVer),2.0)" />
3758
<PackageVersion Include="OpenTracing" Version="[0.12.1,0.13)" />
38-
39-
<!--
40-
Typically, the latest stable version of System.Diagnostics.DiagnosticSource should be used here because:
41-
1) Each major version bump will likely have some new OpenTelemetry capabilities (e.g. .NET 6 introduced Meter
42-
API, .NET 7 added UpDownCounter, .NET 8 added Meter/Instrument level attributes support, .NET 9 added
43-
Advice/Hint API, etc.).
44-
2) Each minor version bump is normally security hotfixes or critical bug fixes.
45-
3) The .NET runtime team provides extra backward compatibility guarantee to System.Diagnostics.DiagnosticSource
46-
even during major version bumps, so compatibility is not a concern here.
47-
-->
48-
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="[9.0.0,)" />
4959
</ItemGroup>
5060

5161
<ItemGroup>

src/OpenTelemetry.Api.ProviderBuilderExtensions/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Notes](../../RELEASENOTES.md).
77

88
## Unreleased
99

10+
* **Breaking Change** When targeting `net8.0`, the package now depends on version
11+
`8.0.0` of the `Microsoft.Extensions.DependencyInjection.Abstractions` NuGet package.
12+
([#6327](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6327))
13+
1014
## 1.13.1
1115

1216
Released 2025-Oct-09

src/OpenTelemetry.Exporter.Console/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Notes](../../RELEASENOTES.md).
66

77
## Unreleased
88

9+
* **Breaking Change** When targeting `net8.0`, the package now depends on version
10+
`8.0.0` of the `Microsoft.Extensions.DependencyInjection.Abstractions`,
11+
`Microsoft.Extensions.Diagnostics.Abstractions` and
12+
`Microsoft.Extensions.Logging.Configuration` NuGet packages.
13+
([#6327](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6327))
14+
915
## 1.13.1
1016

1117
Released 2025-Oct-09

src/OpenTelemetry.Exporter.InMemory/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Notes](../../RELEASENOTES.md).
66

77
## Unreleased
88

9+
* **Breaking Change** When targeting `net8.0`, the package now depends on version
10+
`8.0.0` of the `Microsoft.Extensions.DependencyInjection.Abstractions`,
11+
`Microsoft.Extensions.Diagnostics.Abstractions` and
12+
`Microsoft.Extensions.Logging.Configuration` NuGet packages.
13+
([#6327](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6327))
14+
915
## 1.13.1
1016

1117
Released 2025-Oct-09

src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
<AllowUnsafeBlocks Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(NetFrameworkMinimumSupportedVersion)'">true</AllowUnsafeBlocks>
2020
</PropertyGroup>
2121

22+
<!-- This package is explicitly upgraded for .NET 8 to fix native AoT compatibility issues -->
23+
<ItemGroup>
24+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" VersionOverride="8.0.2" Condition="'$(TargetFramework)' == 'net8.0'" />
25+
</ItemGroup>
26+
2227
<ItemGroup>
2328
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
2429
</ItemGroup>

src/OpenTelemetry.Exporter.Prometheus.AspNetCore/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ Notes](../../RELEASENOTES.md).
77

88
## Unreleased
99

10+
* **Breaking Change** When targeting `net8.0`, the package now depends on version
11+
`8.0.0` of the `Microsoft.Extensions.DependencyInjection.Abstractions`,
12+
`Microsoft.Extensions.Diagnostics.Abstractions` and
13+
`Microsoft.Extensions.Logging.Configuration` NuGet packages.
14+
([#6327](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6327))
15+
1016
## 1.13.0-beta.1
1117

1218
Released 2025-Oct-01

src/OpenTelemetry.Exporter.Prometheus.HttpListener/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ Notes](../../RELEASENOTES.md).
77

88
## Unreleased
99

10+
* **Breaking Change** When targeting `net8.0`, the package now depends on version
11+
`8.0.0` of the `Microsoft.Extensions.DependencyInjection.Abstractions`,
12+
`Microsoft.Extensions.Diagnostics.Abstractions` and
13+
`Microsoft.Extensions.Logging.Configuration` NuGet packages.
14+
([#6327](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6327))
15+
1016
## 1.13.0-beta.1
1117

1218
Released 2025-Oct-01

src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Notes](../../RELEASENOTES.md).
66

77
## Unreleased
88

9+
* **Breaking Change** When targeting `net8.0`, the package now depends on version
10+
`8.0.0` of the `Microsoft.Extensions.DependencyInjection.Abstractions`,
11+
`Microsoft.Extensions.Diagnostics.Abstractions` and
12+
`Microsoft.Extensions.Logging.Configuration` NuGet packages.
13+
([#6327](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6327))
14+
915
## 1.13.1
1016

1117
Released 2025-Oct-09

src/OpenTelemetry.Extensions.Hosting/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Notes](../../RELEASENOTES.md).
66

77
## Unreleased
88

9+
* **Breaking Change** When targeting `net8.0`, the package now depends on version
10+
`8.0.0` of the `Microsoft.Extensions.DependencyInjection.Abstractions`,
11+
`Microsoft.Extensions.Diagnostics.Abstractions`,
12+
`Microsoft.Extensions.Hosting.Abstractions` and
13+
`Microsoft.Extensions.Logging.Configuration` NuGet packages.
14+
([#6327](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6327))
15+
916
## 1.13.1
1017

1118
Released 2025-Oct-09

src/OpenTelemetry/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Notes](../../RELEASENOTES.md).
66

77
## Unreleased
88

9+
* **Breaking Change** When targeting `net8.0`, the package now depends on version
10+
`8.0.0` of the `Microsoft.Extensions.DependencyInjection.Abstractions`,
11+
`Microsoft.Extensions.Diagnostics.Abstractions` and
12+
`Microsoft.Extensions.Logging.Configuration` NuGet packages.
13+
([#6327](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6327))
14+
915
## 1.13.1
1016

1117
Released 2025-Oct-09

0 commit comments

Comments
 (0)