Skip to content

Drop .NET 6, .NET Standard 2.0, .NET 4.8.1, add .NET 10 support#1049

Merged
adamhathcock merged 5 commits intomasterfrom
copilot/drop-dotnet-6-support
Nov 29, 2025
Merged

Drop .NET 6, .NET Standard 2.0, .NET 4.8.1, add .NET 10 support#1049
adamhathcock merged 5 commits intomasterfrom
copilot/drop-dotnet-6-support

Conversation

Copy link
Contributor

Copilot AI commented Nov 29, 2025

.NET 6 reached end-of-life November 2024. This updates target frameworks to drop net6.0, netstandard2.0, and net481, and add net10.0.

Target Frameworks

  • SharpCompress: net48;net8.0;net10.0 (removed net6.0, netstandard2.0, net481)
  • Test/Performance/Build projects: Updated to net10.0

SDK & CI

  • global.json: SDK 10.0.100
  • GitHub Actions: dotnet-version 10.0.x

.NET 10 Compatibility Fix

Rfc2898DeriveBytes constructor is obsolete in .NET 10 (SYSLIB0060). Updated to use static Pbkdf2 method:

#elif NET10_0_OR_GREATER
    var derivedKey = Rfc2898DeriveBytes.Pbkdf2(
        passwordBytes, salt, RFC2898_ITERATIONS,
        HashAlgorithmName.SHA1, derivedKeySize);
    KeyBytes = derivedKey.AsSpan(0, KeySizeInBytes).ToArray();
    IvBytes = derivedKey.AsSpan(KeySizeInBytes, KeySizeInBytes).ToArray();

Package Updates

Original prompt

This section details on the original issue you should resolve

<issue_title>TargetFrameworks</issue_title>
<issue_description>Now that dotnet 10 is out, dotnet 6 should be dropped.

Probably dropping net standard too?

Should double check supported frameworks against windows.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 29, 2025
Copilot AI and others added 2 commits November 29, 2025 11:03
- Updated SharpCompress.csproj target frameworks from net48;net481;netstandard2.0;net6.0;net8.0 to net48;net481;netstandard2.0;net8.0;net10.0
- Updated test and build projects to use .NET 10
- Updated global.json to .NET 10 SDK
- Updated CI workflow to use .NET 10
- Fixed deprecated Rfc2898DeriveBytes constructor for .NET 10 (SYSLIB0060)
- Updated package description and README to reflect new supported frameworks
- Updated package versions for .NET 10 compatibility

Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove support for dotnet 6 and net standard Drop .NET 6, add .NET 10 support Nov 29, 2025
Copilot AI requested a review from adamhathcock November 29, 2025 11:08
@adamhathcock
Copy link
Owner

@copilot remove netstandard target and 4.81 target. Keep 4.8 and botnet 8 & 10 only

- Updated target frameworks to net48;net8.0;net10.0 only
- Removed netstandard2.0 and net481 package conditions
- Updated conditional compilation to use NETFRAMEWORK only
- Updated package description and README

Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 29, 2025

@copilot remove netstandard target and 4.81 target. Keep 4.8 and botnet 8 & 10 only

Done in 5aa216b. Removed netstandard2.0 and net481 targets. Target frameworks are now net48;net8.0;net10.0 only.

@adamhathcock
Copy link
Owner

@copilot update the title of the PR and update the linked issue

Copilot AI changed the title Drop .NET 6, add .NET 10 support Drop .NET 6, .NET Standard 2.0, .NET 4.8.1, add .NET 10 support Nov 29, 2025
Copilot AI requested a review from adamhathcock November 29, 2025 11:46
Copy link
Contributor Author

Copilot AI commented Nov 29, 2025

@copilot update the title of the PR and update the linked issue

I'm unable to update the PR title or linked issue directly due to my environment limitations. You can update the PR title to something like "Drop .NET 6, .NET Standard 2.0, .NET 4.8.1, add .NET 10 support" to reflect the final target frameworks: net48;net8.0;net10.0.

@adamhathcock adamhathcock marked this pull request as ready for review November 29, 2025 11:57
Copilot AI review requested due to automatic review settings November 29, 2025 11:57
Copy link
Contributor

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 modernizes the SharpCompress library by dropping end-of-life frameworks (.NET 6.0, .NET Standard 2.0, .NET 4.8.1) and adding support for .NET 10.0. The changes address .NET 6's November 2024 end-of-life and ensure compatibility with the latest .NET release.

Key Changes

  • Updated target frameworks to net48, net8.0, and net10.0 across all projects
  • Fixed .NET 10 compatibility by migrating from the obsolete Rfc2898DeriveBytes constructor to the Pbkdf2 static method
  • Upgraded package dependencies to .NET 10-compatible versions (Microsoft.Bcl.AsyncInterfaces, System.Text.Encoding.CodePages, Microsoft.NET.ILLink.Tasks)
  • Updated SDK to 10.0.100 and GitHub Actions to use .NET 10.0.x

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/SharpCompress/SharpCompress.csproj Updated TargetFrameworks to net48;net8.0;net10.0, removed obsolete framework conditions, updated package descriptions
src/SharpCompress/Common/Zip/WinzipAesEncryptionData.cs Added .NET 10 compatibility using Pbkdf2 static method to replace obsolete Rfc2898DeriveBytes constructor
src/SharpCompress/packages.lock.json Removed net6.0, netstandard2.0, and net481 dependency sections; added net10.0 dependencies; updated package versions
tests/SharpCompress.Test/SharpCompress.Test.csproj Updated TargetFrameworks to net10.0;net48 and Debug conditions
tests/SharpCompress.Test/packages.lock.json Replaced net8.0 with net10.0; updated test SDK and transitive dependencies
tests/SharpCompress.Performance/SharpCompress.Performance.csproj Updated TargetFramework from net8.0 to net10.0
tests/SharpCompress.Performance/packages.lock.json Updated framework from net8.0 to net10.0
build/build.csproj Updated TargetFramework from net8.0 to net10.0
build/packages.lock.json Updated framework from net8.0 to net10.0
Directory.Packages.props Updated package versions to .NET 10 compatible versions
global.json Updated SDK version from 8.0.100 to 10.0.100
README.md Updated supported framework list to reflect .NET Framework 4.8, .NET 8.0, and .NET 10.0
.github/workflows/dotnetcore.yml Updated dotnet-version from 8.0.x to 10.0.x

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adamhathcock adamhathcock merged commit 8997f00 into master Nov 29, 2025
13 checks passed
@adamhathcock adamhathcock deleted the copilot/drop-dotnet-6-support branch November 29, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop .NET 6, .NET Standard 2.0, .NET 4.8.1, add .NET 10 support

2 participants

Comments