Skip to content

Update dependencies#70

Open
Joy-less wants to merge 1 commit intooleg-st:masterfrom
Joy-less:update-dependencies
Open

Update dependencies#70
Joy-less wants to merge 1 commit intooleg-st:masterfrom
Joy-less:update-dependencies

Conversation

@Joy-less
Copy link
Copy Markdown

@Joy-less Joy-less commented Apr 9, 2026

Hi. This pull request makes several changes, so I've summarised the changes for each file below.

  • Changes the target frameworks to remove obsolete frameworks like netcoreapp3.1 and switches to net8.0, net9.0, net10.0, netstandard2.0, netstandard2.1, net48.
    • This should not remove support for any frameworks, due to .NET Standard 2.0 supporting .NET Framework 4.6.2 (the oldest framework previously supported).
  • Updated the package dependencies of each project.
  • Several fixes for warnings by VS2026.

Summary for each file:

src/Sandbox/Sandbox.csproj:

  • Changed target frameworks to .NET Framework 4.8, .NET 8.0, .NET 9.0, .NET 10.0
  • Changed language version to 14 (latest)

src\Zstd.Extern\Zstd.Extern.csproj:

  • Changed target frameworks to .NET Standard 2.0, .NET Standard 2.1, .NET Framework 4.8, .NET 8.0, .NET 9.0, .NET 10.0
  • Changed language version to 14 (latest)
  • Enabled IsAotCompatible for .NET 8.0 and higher

src\ZstdSharp.Benchmark\ZstdSharp.Benchmark.csproj:

  • Changed target frameworks to .NET Framework 4.8, .NET 8.0, .NET 9.0, .NET 10.0
  • Changed language version to 14 (latest)
  • Updated benchmark packages

src\ZstdSharp.Test\ZstdNetSteamingTests.cs:

  • Changed async void to async Test to be compatible with xUnit v3
  • Passed test cancellation token to methods accepting cancellation token (to fix warnings produced by xUnit v3)

src\ZstdSharp.Test\ZstdSharp.Test.csproj:

  • Changed target frameworks to .NET Framework 4.8, .NET 8.0, .NET 9.0, .NET 10.0
  • Changed language version to 14 (latest)
  • Updated test packages, including updating from xUnit (deprecated) to xUnit v3

src\ZstdSharp\CompressionStream.cs:

  • Fixed warning that null check is redundant by removing unnecessary null check (spans cannot be null as they are structs - passing a null array creates an empty span, so behaviour here will be the same)

src\ZstdSharp\Unsafe\Bitstream.cs:

  • Removed unused local variables

src\ZstdSharp\Unsafe\HufDecompress.cs:

  • Removed unused local variables

src\ZstdSharp\Unsafe\ZstdDecompressBlock.cs:

  • Replaced deprecated Thread.VolatileRead with Volatile.Read (Thread.VolatileRead just calls Volatile.Read)

src\ZstdSharp\ZstdSharp.csproj:

  • Changed target frameworks to .NET Standard 2.0, .NET Standard 2.1, .NET Framework 4.8, .NET 8.0, .NET 9.0, .NET 10.0
  • Changed language version to 14 (latest)
  • Enabled IsAotCompatible for .NET 8.0 and higher
  • Updated packages

Following this pull request, all tests pass for me. Let me know if you disagree with one of the changes made here.

Note: This pull request was hand-written by myself, not created with AI.

@oleg-st
Copy link
Copy Markdown
Owner

oleg-st commented Apr 9, 2026

Hi.

I'm not removing support for older frameworks yet as long as it costs almost nothing to support them.
Also don't have any conditional directives for NET 10, so the ZstdSharp for NET 9 should work for 10.

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.

2 participants