Skip to content

Fix GViewer BinaryFormatter crash on .NET 9/10; add NuGet package CI#1

Merged
aschoelzhorn merged 1 commit into
masterfrom
copilot/fix-issue-387-migrate-dotnet10
Jun 22, 2026
Merged

Fix GViewer BinaryFormatter crash on .NET 9/10; add NuGet package CI#1
aschoelzhorn merged 1 commit into
masterfrom
copilot/fix-issue-387-migrate-dotnet10

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown

GViewer() throws PlatformNotSupportedException on .NET 9+ because GViewer.resx embeds an ImageListStreamer serialized via BinaryFormatter, which was removed in .NET 9. WinForms 9+ handles this natively when targeting the correct TFM — the fix is shipping dedicated TFM binaries.

GraphViewerGDI.csproj

  • Extend TargetFrameworks: net472;net6.0-windows…;net8.0-windows;net9.0-windows;net10.0-windows
  • Add <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources> — required by the .NET 10 SDK when a project with binary .resx resources also targets net472

GraphViewerGDI.nuspec

  • Add <dependencies> groups for net8.0-windows7.0, net9.0-windows7.0, net10.0-windows7.0
  • Add <files> entries for the three new TFM DLL/XML outputs

.github/workflows/nuget-packages.yml (new)

Workflow that builds and packs Msagl, Msagl.Drawing, and Msagl.GraphViewerGDI, then uploads .nupkg files as artifacts. Triggers on v* tag push (version derived from tag) or manual workflow_dispatch with explicit version input.

Copilot AI changed the title Fix BinaryFormatter crash on .NET 9/10 in GViewer (merge PR #396) Fix GViewer BinaryFormatter crash on .NET 9/10; add NuGet package CI Jun 22, 2026
Copilot AI requested a review from aschoelzhorn June 22, 2026 11:51
@aschoelzhorn aschoelzhorn marked this pull request as ready for review June 22, 2026 13:33
@aschoelzhorn aschoelzhorn merged commit bcdce7e into master Jun 22, 2026
1 check passed
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