Skip to content

build: pin net6 package dependencies to 8.0.0#10

Open
iamherrylok wants to merge 1 commit intoclowd:masterfrom
iamherrylok:chore/pr-setup
Open

build: pin net6 package dependencies to 8.0.0#10
iamherrylok wants to merge 1 commit intoclowd:masterfrom
iamherrylok:chore/pr-setup

Conversation

@iamherrylok
Copy link

@iamherrylok iamherrylok commented Mar 18, 2026

Summary

This PR adjusts package versions specifically for .NET 6 targets while keeping current versions for newer frameworks.

Changes

  • src/Clowd.Clipboard/Clowd.Clipboard.csproj

    • Use System.Text.Encoding.CodePages 8.0.0 when TargetFramework starts with net6.0 (covers both net6.0 and net6.0-windows).
    • Keep System.Text.Encoding.CodePages 9.0.0 for non-.NET 6 target frameworks.
  • src/Clowd.Clipboard.Gdi/Clowd.Clipboard.Gdi.csproj

    • Use System.Drawing.Common 8.0.0 when TargetFramework starts with net6.0 (covers both net6.0 and net6.0-windows).
    • Keep System.Drawing.Common 9.0.0 for non-.NET 6 target frameworks (excluding net461 as before).

Why

.NET 6 targets should consume dependency versions aligned with the .NET 8 package line (8.0.0) rather than 9.0.0.

This keeps behavior for .NET 8+ targets unchanged while improving compatibility and clarity for .NET 6 target selection.

Notes

  • Condition logic uses StartsWith("net6.0") to cover both net6.0 and net6.0-windows in a single expression.
  • No runtime behavior changes; this is a package-version targeting update only.

@iamherrylok iamherrylok deleted the chore/pr-setup branch March 18, 2026 08:28
@iamherrylok iamherrylok restored the chore/pr-setup branch March 18, 2026 08:30
@iamherrylok iamherrylok reopened this Mar 18, 2026
@caesay
Copy link
Member

caesay commented Mar 18, 2026

Hey, thanks for the contribution. Not sure I entirely understand why this is necessary? Your entire PR description (including the Why) talks about what was done rather than why it is needed.

@iamherrylok
Copy link
Author

hello caesay, sorry that my earlier description wasn’t very clear.

When using Clowd.Clipboard.Gdi in a .NET 6 project, I consistently get warnings because System.Drawing.Common 9.0.0 and System.Text.Encoding.CodePages 9.0.0 are no longer supported on net6.0. This PR pins those dependencies to version 8.0.0 when targeting .NET 6 in order to eliminate those warnings and keep the package compatible with that target framework.

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