[PR #1049] [MERGED] Drop .NET 6, .NET Standard 2.0, .NET 4.8.1, add .NET 10 support #1467

Open
opened 2026-01-29 22:20:43 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/1049
Author: @Copilot
Created: 11/29/2025
Status: Merged
Merged: 11/29/2025
Merged by: @adamhathcock

Base: masterHead: copilot/drop-dotnet-6-support


📝 Commits (5)

  • 1993673 Initial plan
  • 131bd2b Drop .NET 6 support and add .NET 10 support
  • 8af4754 Fix .NET 10.0 formatting in README
  • 5aa216b Remove netstandard2.0 and net481 targets, keep net48, net8.0, net10.0
  • d34a47c update dependencies

📊 Changes

13 files changed (+107 additions, -271 deletions)

View changed files

📝 .github/workflows/dotnetcore.yml (+1 -1)
📝 Directory.Packages.props (+4 -4)
📝 README.md (+1 -1)
📝 build/build.csproj (+1 -1)
📝 build/packages.lock.json (+1 -1)
📝 global.json (+1 -1)
📝 src/SharpCompress/Common/Zip/WinzipAesEncryptionData.cs (+20 -4)
📝 src/SharpCompress/SharpCompress.csproj (+8 -10)
📝 src/SharpCompress/packages.lock.json (+21 -211)
📝 tests/SharpCompress.Performance/SharpCompress.Performance.csproj (+1 -1)
📝 tests/SharpCompress.Performance/packages.lock.json (+1 -1)
📝 tests/SharpCompress.Test/SharpCompress.Test.csproj (+2 -2)
📝 tests/SharpCompress.Test/packages.lock.json (+45 -33)

📄 Description

.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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/1049 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 11/29/2025 **Status:** ✅ Merged **Merged:** 11/29/2025 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `copilot/drop-dotnet-6-support` --- ### 📝 Commits (5) - [`1993673`](https://github.com/adamhathcock/sharpcompress/commit/1993673a22f6edffed3139793b014f9843bc0ee1) Initial plan - [`131bd2b`](https://github.com/adamhathcock/sharpcompress/commit/131bd2b7b88b9d4ec44f6470011a4cf5c6556926) Drop .NET 6 support and add .NET 10 support - [`8af4754`](https://github.com/adamhathcock/sharpcompress/commit/8af47548fe7ce8a3c08fe1e3dd3bffeff9826d6d) Fix .NET 10.0 formatting in README - [`5aa216b`](https://github.com/adamhathcock/sharpcompress/commit/5aa216bd218b786f351430afb043795eb9e36ac0) Remove netstandard2.0 and net481 targets, keep net48, net8.0, net10.0 - [`d34a47c`](https://github.com/adamhathcock/sharpcompress/commit/d34a47c148f0fc02d68c24a46cec7a4c02a51fb9) update dependencies ### 📊 Changes **13 files changed** (+107 additions, -271 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/dotnetcore.yml` (+1 -1) 📝 `Directory.Packages.props` (+4 -4) 📝 `README.md` (+1 -1) 📝 `build/build.csproj` (+1 -1) 📝 `build/packages.lock.json` (+1 -1) 📝 `global.json` (+1 -1) 📝 `src/SharpCompress/Common/Zip/WinzipAesEncryptionData.cs` (+20 -4) 📝 `src/SharpCompress/SharpCompress.csproj` (+8 -10) 📝 `src/SharpCompress/packages.lock.json` (+21 -211) 📝 `tests/SharpCompress.Performance/SharpCompress.Performance.csproj` (+1 -1) 📝 `tests/SharpCompress.Performance/packages.lock.json` (+1 -1) 📝 `tests/SharpCompress.Test/SharpCompress.Test.csproj` (+2 -2) 📝 `tests/SharpCompress.Test/packages.lock.json` (+45 -33) </details> ### 📄 Description .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: ```csharp #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 - Microsoft.NET.ILLink.Tasks: 8.0.21 → 10.0.0 - Fixes adamhathcock/sharpcompress#1048 <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *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) > > <comments> > </comments> > </details> - Fixes adamhathcock/sharpcompress#1048 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:20:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1467