Make the Hub build and run on modern .NET (net10 + Avalonia runtime-binding namespace fix)#1
Open
JeanxPereira wants to merge 2 commits into
Open
Make the Hub build and run on modern .NET (net10 + Avalonia runtime-binding namespace fix)#1JeanxPereira wants to merge 2 commits into
JeanxPereira wants to merge 2 commits into
Conversation
TitleBar/TitleBarUnderlay (and others) bind attached properties via runtime-parsed
paths, e.g. {Binding Path=(rc:WindowChromeAddon.ManagedShowTitle), RelativeSource=...}.
Avalonia's runtime (reflection) type resolver cannot resolve `using:`-style XML
namespaces in these bindings — it throws "Unable to resolve type rc:WindowChromeAddon
from any of the following locations:" (empty) on the first window measured, crashing
startup. Qualifying the namespaces as clr-namespace:ReCap.CommonUI[...];assembly=ReCap.CommonUI
makes them resolvable at runtime (equivalent for compiled XAML). Applied to all 30 affected .axaml.
net5.0 is out of support and its runtime is no longer installed on modern machines, so the Hub could not run. Bumped ReCap.Hub to net10.0 (vendored ReCap.CommonUI stays netstandard2.0). Builds clean in Debug_Offline and Release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Hub didn't build/run on a current machine. Two fixes get it launching cleanly — verified: the window opens, the first-run "Locate Darkspore" screen shows, and it exits cleanly with no exception.
1. Avalonia runtime-binding crash (the blocker)
Styles/Controls/TitleBar.axaml(and others) bind attached properties via runtime-parsed paths, e.g.:Avalonia's runtime (reflection) binding type-resolver can't resolve
using:-style XML namespaces in these paths — it throwsUnable to resolve type rc:WindowChromeAddon from any of the following locations:(the list is empty) on the first window measured, crashing startup on every window. Switching the affectedxmlnsdeclarations fromusing:ReCap.CommonUI[...]toclr-namespace:ReCap.CommonUI[...];assembly=ReCap.CommonUImakes them resolvable at runtime (semantically identical for compiled XAML). Applied to all 30 affected.axaml.2. TFM net5.0 → net10.0
net5.0 is end-of-life and its runtime isn't present on modern machines, so the app couldn't run. Bumped
ReCap.Hubto net10.0; the vendoredReCap.CommonUIstaysnetstandard2.0.Verified
dotnet build src/ReCap.Hub/ReCap.Hub.csproj -c Debug_Offlineand-c Release→ 0 errors.Notes
-c Debug_Offline(orRelease); plainDebugintentionally errors onEnableReCapOnline.ReCap.UITeststill targets net5.0 (untouched; not needed to run the Hub) — easy follow-up.