Skip to content

Commit 28b7948

Browse files
committed
Use 8.0 dependencies for non net9.0, except for System.Diagnostics.DiagnosticSource
1 parent b9be07a commit 28b7948

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Directory.Packages.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
possible and only deviate (use a specific version) when a package has a
1010
more specific patch which must be reference directly.
1111
-->
12-
<LatestRuntimeOutOfBandVer>9.0.0</LatestRuntimeOutOfBandVer>
12+
<Runtime9OutOfBandVer>9.0.0</Runtime9OutOfBandVer>
13+
<LatestRuntimeOutOfBandVer>8.0.0</LatestRuntimeOutOfBandVer>
14+
<LatestRuntimeOutOfBandVer Condition="'$(TargetFramework)' == 'net9.0'">$(Runtime9OutOfBandVer)</LatestRuntimeOutOfBandVer>
1315

1416
<!-- Mitigate https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43485. -->
1517
<SystemTextEncodingsWebOutOfBandMinimumCoreAppVer>8.0.0</SystemTextEncodingsWebOutOfBandMinimumCoreAppVer>
@@ -59,7 +61,7 @@
5961
3) The .NET runtime team provides extra backward compatibility guarantee to System.Diagnostics.DiagnosticSource
6062
even during major version bumps, so compatibility is not a concern here.
6163
-->
62-
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(LatestRuntimeOutOfBandVer)" />
64+
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(Runtime9OutOfBandVer)" />
6365

6466
<!--
6567
We use conservative versions of these packages where an upgrade might

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>$(TargetFrameworksForLibrariesExtended)</TargetFrameworks>
44
<Description>OpenTelemetry protocol exporter for OpenTelemetry .NET</Description>
@@ -17,6 +17,7 @@
1717
and https://github.com/dotnet/runtime/issues/92509 -->
1818
<NoWarn>$(NoWarn);SYSLIB1100;SYSLIB1101</NoWarn>
1919
<AllowUnsafeBlocks Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(NetFrameworkMinimumSupportedVersion)'">true</AllowUnsafeBlocks>
20+
<ImplicitUsings>enable</ImplicitUsings>
2021
</PropertyGroup>
2122

2223
<ItemGroup>
@@ -25,6 +26,7 @@
2526

2627
<ItemGroup>
2728
<Reference Include="System.Net.Http" Condition="'$(TargetFramework)' == '$(NetFrameworkMinimumSupportedVersion)'" />
29+
<Using Include="System.Net.Http" Condition="'$(TargetFramework)' == '$(NetFrameworkMinimumSupportedVersion)'" />
2830
</ItemGroup>
2931

3032
<ItemGroup>

0 commit comments

Comments
 (0)