|
12 | 12 | <RuntimePackageVersions>9.0.0</RuntimePackageVersions>
|
13 | 13 | <!--
|
14 | 14 | For modern .NET runtimes, match the major version of packages to the major version of the runtime.
|
| 15 | + 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). |
15 | 16 | See https://github.com/open-telemetry/opentelemetry-dotnet/issues/5973 for more details.
|
16 |
| - However, for .NET 8 we unfortunately need to use .NET 9 packages as the following APIs have been |
17 |
| - used to expose user-facing functionality: |
18 |
| - - System.Diagnostics.Activity.ctor(string, string, IEnumerable<KeyValuePair<string, object>>) |
19 |
| - - System.Diagnostics.Activity.AddException() |
20 |
| - - System.Diagnostics.Activity.AddLink() |
21 | 17 | -->
|
22 |
| - <RuntimePackageVersions Condition="'$(TargetFramework)' == 'net8.0'">9.0.0</RuntimePackageVersions> |
| 18 | + <RuntimePackageVersions Condition="'$(TargetFramework)' == 'net8.0'">8.0.0</RuntimePackageVersions> |
23 | 19 | <RuntimePackageVersions Condition="'$(TargetFramework)' == 'net9.0'">9.0.0</RuntimePackageVersions>
|
24 | 20 |
|
25 | 21 | <!-- Mitigate https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43485. -->
|
|
33 | 29 | vulnerability in the NuGet packages that are published from this repository.
|
34 | 30 | -->
|
35 | 31 | <ItemGroup>
|
36 |
| - <!-- |
37 |
| - Typically, for the Microsoft.Extensions.* packages relating to DI Abstractions, Hosting Abstractions, and Logging, |
38 |
| - the latest stable version should be used because: |
39 |
| - 1) Each major version bump will have some new API capabilities (e.g.For Logging, .NET 6 introduced compile-time logging |
40 |
| - source generation, .NET 8 introduced automatic event id generation). |
41 |
| - 2) Each minor version bump is normally security hotfixes or critical bug fixes. |
42 |
| - 3) Since version 3.1.0, the .NET runtime team is holding a high bar for backward compatibility on |
43 |
| - these packages even during major version bumps, so compatibility is not a concern here. |
44 |
| - --> |
45 | 32 | <PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(RuntimePackageVersions)" />
|
46 | 33 | <PackageVersion Include="Microsoft.Extensions.Diagnostics.Abstractions" Version="$(RuntimePackageVersions)" />
|
47 | 34 | <PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(RuntimePackageVersions)" />
|
|
59 | 46 | <PackageVersion Include="OpenTracing" Version="[0.12.1,0.13)" />
|
60 | 47 |
|
61 | 48 | <!--
|
62 |
| - Typically, the latest stable version of System.Diagnostics.DiagnosticSource should be used here because: |
63 |
| - 1) Each major version bump will likely have some new OpenTelemetry capabilities (e.g. .NET 6 introduced Meter |
64 |
| - API, .NET 7 added UpDownCounter, .NET 8 added Meter/Instrument level attributes support, .NET 9 added |
65 |
| - Advice/Hint API, etc.). |
66 |
| - 2) Each minor version bump is normally security hotfixes or critical bug fixes. |
67 |
| - 3) The .NET runtime team provides extra backward compatibility guarantee to System.Diagnostics.DiagnosticSource |
68 |
| - even during major version bumps, so compatibility is not a concern here. |
| 49 | + For modern .NET runtimes, match the major version of packages to the major version of the runtime. |
| 50 | + 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). |
| 51 | + See https://github.com/open-telemetry/opentelemetry-dotnet/issues/5973 for more details. |
69 | 52 | -->
|
70 | 53 | <PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(RuntimePackageVersions)" />
|
| 54 | + <!-- |
| 55 | + However, for .NET 8 we need to use the .NET 9 package as the following APIs have been used to expose user-facing functionality: |
| 56 | + - System.Diagnostics.Activity.ctor(string, string, IEnumerable<KeyValuePair<string, object>>) |
| 57 | + - System.Diagnostics.Activity.AddException() |
| 58 | + - System.Diagnostics.Activity.AddLink() |
| 59 | + --> |
| 60 | + <PackageVersion Update="System.Diagnostics.DiagnosticSource" Version="9.0.0" Condition="'$(TargetFramework)' == 'net8.0'" /> |
71 | 61 | </ItemGroup>
|
72 | 62 |
|
73 | 63 | <ItemGroup>
|
|
0 commit comments