Skip to content
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

[Instrumentation.WCF] Switch .NET6 to .NET8 #2263

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Instrumentation.Wcf/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Drop support for .NET 6 as this target is no longer supported and add .NET 8 target.
([#2263](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2263))

## 1.0.0-rc.18

Released 2024-Oct-28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<TargetFrameworks>net6.0;$(NetStandardMinimumSupportedVersion);$(NetFrameworkMinimumSupportedVersion)</TargetFrameworks>
<TargetFrameworks>$(NetMinimumSupportedVersion);$(NetStandardMinimumSupportedVersion);$(NetFrameworkMinimumSupportedVersion)</TargetFrameworks>
<Description>OpenTelemetry instrumentation for WCF.</Description>
<PackageTags>$(PackageTags);distributed-tracing;WCF</PackageTags>
<MinVerTagPrefix>Instrumentation.Wcf-</MinVerTagPrefix>
Expand All @@ -23,10 +23,10 @@
<Reference Include="System.ServiceModel" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(NetStandardMinimumSupportedVersion)' OR '$(TargetFramework)' == 'net6.0' " >
<ItemGroup Condition="'$(TargetFramework)' == '$(NetStandardMinimumSupportedVersion)' OR '$(TargetFramework)' == '$(NetMinimumSupportedVersion)' " >
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would switch this to detect .NETCoreApp so it doesn't need adjustment if some other target (eg $(NetMinimumSupportedVersion);net9.0) is added.

  <ItemGroup Condition="'$(TargetFramework)' == '$(NetStandardMinimumSupportedVersion)' OR '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.1" />
    <PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />
    <PackageReference Include="System.Drawing.Common" Version="4.7.2" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
  </ItemGroup>

But also consider bumping to 8.0.0 versions for net8.0+:

  <ItemGroup Condition="'$(TargetFramework)' == '$(NetStandardMinimumSupportedVersion)'">
    <PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />

    <!-- System.Security.Cryptography.Xml is indirect reference. It is needed to upgrade it directly to avoid https://github.com/advisories/GHSA-rxg9-xrhp-64gj -->
    <PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.1" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <PackageReference Include="System.ServiceModel.Primitives" Version="8.0.0" />

    <!-- System.Security.Cryptography.Xml is indirect reference. It is needed to upgrade it directly to avoid https://github.com/advisories/GHSA-555c-2p6r-68mm -->
    <PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.2" />
  </ItemGroup>

The 8.0.0 versions don't bring in System.Drawing.Common at all. The current form will force System.Drawing.Common onto users who may have already bumped to 8.0.0 to eliminate it 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First part done. Second deferred to #2274

<PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.1" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />
<PackageReference Include="System.Drawing.Common" Version="4.7.2" Condition=" '$(TargetFramework)' == 'net6.0' " />
<PackageReference Include="System.Drawing.Common" Version="4.7.2" Condition=" '$(TargetFramework)' == '$(NetMinimumSupportedVersion)' " />
</ItemGroup>

<ItemGroup>
Expand Down
Loading