Skip to content

Add .NET 10 Windows targeting and package validation - #366

Open
kornman00 wants to merge 1 commit into
tgjones:masterfrom
kornman00:kornman00-caliburn5-upgrade-net10
Open

kornman00 wants to merge 1 commit into
tgjones:masterfrom
kornman00:kornman00-caliburn5-upgrade-net10

Conversation

@kornman00

@kornman00 kornman00 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add net10.0-windows as a fourth Gemini target while retaining net462, net6.0-windows, and net7.0-windows.

This is an additive runtime/package-contract change, not the Caliburn 5 migration. Caliburn.Micro remains 4.0.210, and all existing application dependency versions remain fixed. The merged MahApps.Metro 2.4.11 compatibility work from #365 supplies the .NET 10 window-drag prerequisite and its focused host.

.NET 10 WPF supplies System.Drawing.Common through WindowsDesktop, while the retained net6/net7 WPF lanes still need the direct 6.0.0 compile package. This PR encodes that distinction in both MSBuild and the package contract rather than upgrading Drawing.Common or weakening dependency validation.

Scope

  • add net10.0-windows to all eight packable library projects and the non-packable Gemini.Demo;
  • retain the existing net462, net6, and net7 targets;
  • retain the demo's existing Helix policy: HelixToolkit.Wpf for net462 and HelixToolkit.Core.Wpf for modern targets, now including net10;
  • condition Inspector's System.Drawing.Common 6.0.0 reference out for net10 only;
  • disable SDK 10 package pruning for Inspector's retained net6/net7 lanes so their required Drawing.Common compile assets remain available;
  • add net10 assemblies, portable PDBs, dependency groups, and demo shaders to the declarative package contract;
  • extend the validator with complete per-nuspec-TFM external dependency overrides.

The target-specific override is a complete replacement external-dependency set, not a merge or subtraction list. Override keys must match a declared nuspec framework. An empty Inspector net10 override therefore asserts that no external Drawing.Common dependency is emitted, while retained targets continue to require exactly version 6.0.0. Internal Gemini dependencies remain coherent at the package version being validated, and missing, unexpected, duplicate, or wrong-version dependencies still fail validation.

Intentionally unchanged:

  • Caliburn.Micro remains 4.0.210;
  • MahApps.Metro remains 2.4.11;
  • System.ComponentModel.Composition remains 6.0.0 on every target, including net10;
  • AvalonDock, AvalonEdit, the WPF toolkit, Behaviors, Roslyn, Helix, HLSL tooling, ControlzEx, NBGV, and all other dependency versions are unchanged;
  • no target is removed and no legacy package line is introduced;
  • no theme/chrome redesign, Fluent migration, performance work, or publication change is included.

Evidence

  • The pinned .NET 10.0.400 SDK restores and builds the complete solution in Release for all four target frameworks.
  • All eight primary packages and eight symbol packages contain their intended net10 DLL/PDB assets alongside the retained targets.
  • Every package contains the exact four nuspec dependency groups and coherent internal Gemini versions.
  • GeminiWpf retains System.ComponentModel.Composition 6.0.0 in its net10 dependency group.
  • Gemini.Modules.Inspector retains System.Drawing.Common 6.0.0 for net462/net6/net7 and emits no Drawing.Common dependency for net10.
  • Both demo shaders are present for each of the four target outputs.
  • Six fault-injection checks confirmed the validator rejects a missing net10 DLL, PDB, or shader; missing net10 Composition; unexpected net10 Drawing.Common; and a wrong net10 Composition version.
  • The inherited MahApps compatibility host passes its noninteractive .NET 10 startup/native-handle smoke mode.
  • Gemini.Demo starts and remains responsive on net10; Helix and Inspector content load, Light/Dark/Blue theme changes resolve, and maximize/restore works.
  • On Windows 11 build 26200 with .NET SDK 10.0.400, a native mouse drag moved the normal window from (300,60)-(1300,820) to (433,117)-(1433,877) without changing its 1000x760 size.
  • All four resize zones returned the expected Win32 non-client hit-test values (HTLEFT, HTRIGHT, HTTOP, and HTBOTTOM) and mouse drags changed the corresponding bounds: right edge 1000→1120 width, bottom edge 760→850 height, left edge 1120→1200 width, and top edge 850→910 height.
  • Maximizing produced a 1936x1048 zoomed window. Dragging its title restored it to the prior 1200x910 normal bounds and moved it to (473,154).
  • Light-theme glow/border state matched Gemini's resources: active normal/resized/restored captures used MainWindowActiveBorder (#9B9FB9), an inactive capture used MainWindowInactiveBorder (#CCCEDB), and the maximized capture suppressed that normal-window glow border.
  • Confirmed Gemini.Demo normal title drag, maximized drag-to-restore, all resize edges, and active/inactive/maximized glow behavior on net10. This is separate from the compatibility host smoke check.

Validation

  • dotnet restore src\Gemini.sln --configfile src\NuGet.config
  • dotnet build src\Gemini.sln --configuration Release --no-restore
  • dotnet pack src\Gemini.sln --configuration Release --no-build --no-restore --output build\packages
  • pwsh -NoProfile -File eng\validate-artifacts.ps1
  • dotnet run --project eng\compatibility\MahApps.Net10DragHost\MahApps.Net10DragHost.csproj --configuration Release --no-build -- --smoke
  • net10 Gemini.Demo startup, native title-drag/drag-to-restore, four-edge resize, window-state, glow-state, theme, and content checks

The build retains the existing NETSDK1138 warnings for the intentionally preserved, out-of-support net6/net7 executable targets. It introduces no build errors or new dependency-version changes.

Base and rollback

Based on tgjones/gemini:master at 0d775797239b3ba8b2dba2b6a84fe4a73c5322e1, the merge commit for #365. The fork's master branch is fast-forwarded to the same commit.

The branch contains one net10-owned commit above that base. Reverting this PR removes the additive net10 target and its package-contract expectations, restores Inspector's original Drawing.Common declaration/pruning behavior, and restores the README target list. It requires no application-state migration and does not alter publication policy.

Add net10.0-windows to all eight packable libraries and Gemini.Demo while retaining net462, net6.0-windows, and net7.0-windows. Keep Caliburn.Micro 4.0.210 and the existing dependency graph.

Handle System.Drawing.Common deliberately across the target matrix: retain its 6.0.0 compile assets for net462/net6/net7, disable SDK 10 pruning for the retained net6/net7 Inspector lanes, and omit the direct package for net10 WPF where WindowsDesktop provides it.

Extend package-contract.json with complete per-nuspec-TFM external dependency overrides. Refactor validate-artifacts.ps1 to reject override keys that do not match declared frameworks, construct a fresh expected dependency set for every nuspec group, combine coherent internal package versions with either shared external dependencies or the target-specific replacement set, and preserve exact missing, unexpected, and version assertions. An empty Inspector net10 override therefore asserts that Drawing.Common is absent without weakening validation for retained targets.

The shared framework declaration continues to drive assembly, portable PDB, dependency-group, and demo shader validation for all four targets. Update the README target list accordingly.

Validation: Release restore, build, pack, positive artifact validation, six negative contract cases, MahApps smoke, and focused Gemini.Demo net10 runtime checks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kornman00
kornman00 marked this pull request as ready for review September 25, 2026 18:17
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.

1 participant