Repository navigation
Fix UnoWasmChecker for modern .NET 8+ apps (backport #1034) - #1041
Merged
jeromelaban merged 8 commits intoFeb 20, 2026
Merged
Conversation
Modern Uno WASM apps embed the boot configuration directly inside _framework/dotnet.js between /*json-start*/ and /*json-end*/ markers instead of using blazor.boot.json. This change adds support for extracting assemblies and metadata from the embedded boot config, with fallback to blazor.boot.json for older apps. (cherry picked from commit 3050b5d)
Refactor UnoVersionExtractor to expose testable static methods (ExtractBootConfigFromScript, ParseUnoConfigFields, ExtractAssembliesFromResources) and add 19 unit tests covering JSON parsing, boot config extraction, and uno-config parsing. Add CI validation of embedded boot config markers in dotnet.js via MSBuild AfterPublishValidation and a bash script. Address review feedback: remove unused AssemblyDownloadInfo, narrow exception handling in GetDotnetConfigFromDotnetJs, and fix mainAssemblyName comparison by stripping file extension. (cherry picked from commit 3f07fa0)
(cherry picked from commit 80b4857)
Use perl -0777 for multiline JSON extraction in validate-boot-config.sh (sed cannot handle JSON spanning multiple lines, causing CI failure). Include dotnetJsFilename in ParseUnoConfigFields early-break condition so it is always captured regardless of field order in uno-config.js. Remove unreachable catch (JsonException) in GetDotnetConfigFromDotnetJs since ExtractBootConfigFromScript already handles JSON parse failures. (cherry picked from commit 5225b47)
Rewrite to reflect the current tool behavior: modern .NET 8+ boot config extraction, WebCIL support, updated console output columns (Build, Commit), and new diagnostic fields (globalization, linker, debug level). Remove shell prompt prefix from code blocks to fix copy-paste. Add supported formats table, exit codes reference, and update command. (cherry picked from commit c6576a4)
Show dnx as the primary way to run the tool without installation, as introduced in .NET 10. (cherry picked from commit 70bbeeb)
Add blank lines before lists (MD032) and replace bold-as-heading with proper heading levels (MD036) in spec.md and README.md. Add Newtonsoft and Linq to cspell dictionary. (cherry picked from commit 322a41b)
Remove dotnetJsFilename from early-break condition so legacy configs without that field still benefit from early termination. Add null checks for packagePath/managePath in GetUnoConfig to prevent NullReferenceException with incomplete configs. (cherry picked from commit 3976841)
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.
Summary
The
uno-wasm-versiontool (UnoVersionExtractor) no longer works with modern Uno WASM apps (e.g. https://nuget.info/) because:assemblies_with_sizeanduno_mainwere removed fromuno-config.js—ShellTask.csno longer generates these fields (removed in commit 12a666f, Sept 2024).blazor.boot.jsonno longer exists — .NET 8+ embeds the boot configuration directly inside_framework/dotnet.jsbetween/*json-start*/and/*json-end*/markers.The tool was outputting "No assemblies found" and exiting with error code 1 on all modern deployments.
What changed
GetDotnetConfigFromDotnetJs()method that fetches_framework/dotnet.js, extracts the embedded JSON boot config via regex, and parses assemblies and metadata from it.ExtractAssembliesFromResources()helper that handles both the new array format ([{"virtualPath":"X.wasm","name":"X.abc.wasm"}]) and the old object format ({"X.dll": "sha256-..."}).Extract()flow to try the modern dotnet.js path first, then fall back toblazor.boot.jsonfor older apps.UnoConfigto parseconfig.dotnet_js_filenamefromuno-config.js.DotnetConfigwithdebugLevelandlinkerEnabledfields.OutputResults().Backward compatibility
All three config formats are supported:
Verified against