Skip to content

Add .net10 support, remove dead code, rework how dlls are retrieved#190

Merged
ScarletKuro merged 11 commits intomainfrom
net10
Feb 24, 2026
Merged

Add .net10 support, remove dead code, rework how dlls are retrieved#190
ScarletKuro merged 11 commits intomainfrom
net10

Conversation

@ScarletKuro
Copy link
Copy Markdown
Member

@ScarletKuro ScarletKuro commented Feb 23, 2026

.NET 10 broke the dotnet-resources-/ cache that we relied on to fetch reference assemblies for Roslyn compilation. There is no longer a blazor.boot.json, the boot config is now inlined inside dotnet.js https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly/bundle-caching-and-integrity-check-failures?view=aspnetcore-10.0

First I tried this approach (commit bb64f77): fetched _framework/dotnet.js at startup, parsed its embedded JSON to resolve fingerprinted assembly filenames (e.g. MudBlazor.abc123.dll), then fetched each DLL over HTTP to build Roslyn
MetadataReference objects. Complex and slow.

New approach: uses Assembly.TryGetRawMetadata() to read PE bytes directly from assemblies already loaded in the WASM process, zero HTTP requests.

Dead code removed: getCompilationDlls, putInCacheStorage, clearCache, convertBase64StringToBytes,
convertBytesToBase64String, CACHE_NAME, etc all gone.

@ScarletKuro ScarletKuro requested a review from versile2 February 23, 2026 19:35
@sonarqubecloud
Copy link
Copy Markdown

@ScarletKuro ScarletKuro merged commit 046f7da into main Feb 24, 2026
4 checks passed
@ScarletKuro ScarletKuro deleted the net10 branch February 24, 2026 19:47
@versile2
Copy link
Copy Markdown
Contributor

Looks good, verified on Chrome, Edge, Firefox, both incognito and regular. Only odd thing is what we discussed very first time I ran the project it just "stood" there for multiple minutes after I hit Play. Might have been some initial download I needed?

Thank you!

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