Skip to content

build: Update .NET Framework target to 4.7.2 #274

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

DennisDyallo
Copy link
Collaborator

@DennisDyallo DennisDyallo commented Jul 4, 2025

This PR replaces #271
Opting for even broader compatibility over the Net48 update for now.

This pull request updates the project to target .NET Framework 472 and upgrades several dependencies to their latest versions. It includes changes to project files, source code, and build configurations to reflect this update.

Updating addresses performance, greater API and Netstandard 2.0 support, as well as upgrades addresses vulnerabilities (CVE-2019-0981: Denial of Service in System.Private.Uri) (fixed in NET472)

These are in place upgrades that most machines should have by now.

NET 472 is included on Windows Server 2019 (WS2019 is EOL by Msft) and most users will have it installed already.

Based on researching the compatibility of different .NET targetFramework versions and Windows and Windows server, I recommend upgrading to NET472 to enable the performance improvements, vulnerability patches and API features. This version allows us to upgrade and ensures the broadest compatibility.

image

Below are the changes for each of these version updates:


.NET Framework 4.7.1

  • BCL: Full netstandard2.0 support, ResourceManager race condition fix, improved Parallel.For reliability.
  • Security: SHA-2 support for Forms Authentication.
  • General: Numerous bug fixes and performance improvements.

Full changelog


.NET Framework 4.7.2

  • ASP.NET: Various bug fixes and performance improvements.
  • BCL: Cryptography, collections, and serialization improvements.
  • General: Included with Windows Server 2019.

Full changelog


Framework Updates:

  • Updated the target framework from net47 to net472 in TargetFrameworks for Yubico.Core.csproj, Yubico.YubiKey.csproj, and Yubico.NativeShims.nuspec. This ensures compatibility with newer features and improvements provided by .NET Framework 4.7.2. [1] [2] [3]

Package Dependency Updates:

  • Upgraded Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.Logging.Abstractions, and Microsoft.Extensions.Options.ConfigurationExtensions to version 9.0.6 in Yubico.Core.csproj. This improves library compatibility and adds new features.
  • Updated Microsoft.Bcl.AsyncInterfaces, Microsoft.Extensions.Logging.Abstractions, and System.Formats.Cbor to their latest versions in Yubico.YubiKey.csproj. This ensures better performance and compatibility with modern standards. [1] [2]

File Path Adjustments:

  • Changed file paths in Yubico.NativeShims.nuspec to reflect the updated target framework (net472). This aligns the build and runtime files with the new framework version.

@DennisDyallo DennisDyallo requested a review from Copilot July 4, 2025 09:58
@DennisDyallo DennisDyallo added enhancement New feature or request NETFramework Issues relating to NET Framework (4.x) build Pull requests that update the build labels Jul 4, 2025
Copilot

This comment was marked as outdated.

Copy link

github-actions bot commented Jul 4, 2025

Test Results: Windows

    2 files      2 suites   10s ⏱️
3 905 tests 3 905 ✅ 0 💤 0 ❌
3 907 runs  3 907 ✅ 0 💤 0 ❌

Results for commit f83605a.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 4, 2025

Test Results: Ubuntu

    2 files      2 suites   20s ⏱️
3 897 tests 3 897 ✅ 0 💤 0 ❌
3 899 runs  3 899 ✅ 0 💤 0 ❌

Results for commit f83605a.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 4, 2025

Test Results: MacOS

    2 files      2 suites   11s ⏱️
3 897 tests 3 897 ✅ 0 💤 0 ❌
3 899 runs  3 899 ✅ 0 💤 0 ❌

Results for commit f83605a.

♻️ This comment has been updated with latest results.

@DennisDyallo DennisDyallo force-pushed the dennisdyallo/net472 branch from 7f4f6e2 to c4e6bda Compare July 4, 2025 10:03
@DennisDyallo DennisDyallo requested a review from Copilot July 4, 2025 10:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the .NET Framework target to 4.7.2 and upgrades several package dependencies across projects for improved API support, performance, and security fixes.

  • Change target frameworks from net47 to net472 in project and nuspec files.
  • Bump key package references (e.g., Microsoft.Extensions.*) to version 9.0.6.
  • Adjust file paths in the NativeShims nuspec to match the new framework.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Yubico.YubiKey/src/Yubico.YubiKey.csproj Updated net47 to net472 and bumped package versions for AsyncInterfaces, Logging.Abstractions, and Cbor. Adjusted HttpUtility item group.
Yubico.NativeShims/Yubico.NativeShims.nuspec Changed targetFramework group to .NETFramework4.7.2 and updated build/lib paths to net472.
Yubico.Core/src/Yubico.Core.csproj Updated net47 to net472 and bumped Configuration.Json, Logging.Abstractions, and Options.ConfigurationExtensions versions.
Comments suppressed due to low confidence (1)

Yubico.YubiKey/src/Yubico.YubiKey.csproj:133

  • [nitpick] Update the comment to use consistent casing (e.g., .NET472 or .NET Framework 4.7.2) for clarity.
  <!-- This is in order to use the HttpUtility.ParseQueryString in .net472 -->

@DennisDyallo
Copy link
Collaborator Author

This PR replaces #271
Opting for even broader compatibility over the Net48 update for now.

@DennisDyallo DennisDyallo marked this pull request as ready for review July 4, 2025 10:16
Copy link

github-actions bot commented Jul 7, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
Yubico.Core 40% 31% 4371
Yubico.YubiKey 51% 46% 20712
Summary 49% (35547 / 72561) 44% (8706 / 19851) 25083

Minimum allowed line rate is 40%

@AlexLaroche
Copy link

@DennisDyallo : Any idea on when this change will be merged?

@DennisDyallo
Copy link
Collaborator Author

DennisDyallo commented Jul 31, 2025

Hi @AlexLaroche . Sorry for the late response.
No, not yet. Waiting on some internal thumbs up.

Is this PR meaningful to you in any particular way? If so, please share.
Thanks

@AlexLaroche
Copy link

@DennisDyallo : Same goal as what was pursued by: #267

Fix a vulnerability reported in System.Private.Uri (version 4.3.0) which is a transitive dependency of the 'System.Runtime.InteropServices.RuntimeInformation' library (version 4.3.0).

@DennisDyallo
Copy link
Collaborator Author

Our next release is planned for September 17th @AlexLaroche

Can you stick it out until then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Pull requests that update the build enhancement New feature or request NETFramework Issues relating to NET Framework (4.x)
Development

Successfully merging this pull request may close these issues.

2 participants