Skip to content

.net9 Blazor app behaves differently when building and running with VS2026 vs. VS2022 #63608

@AdmiralSnyder

Description

@AdmiralSnyder

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When building and running the application from VS 2026 Insider, i get lots of logging error messages

[MONO] /__w/1/s/src/mono/mono/metadata/mono-hash.c:439
Error
at Fc (http://localhost:5240/_framework/dotnet.runtime.st3wwc8rqy.js:3:168832)
at dotnet.native.wasm.wasm_trace_logger (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[32306]:0x90fb71)
at dotnet.native.wasm.eglib_log_adapter (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[2947]:0x1548df)
at dotnet.native.wasm.monoeg_g_logv_nofree (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[2843]:0x151ab0)
at dotnet.native.wasm.monoeg_g_log (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[2845]:0x151bc5)
at dotnet.native.wasm.monoeg_g_log_disabled (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[2846]:0x151c13)
at dotnet.native.wasm.mono_g_hash_table_insert_replace (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[5611]:0x203359)
at dotnet.native.wasm.mono_g_hash_table_insert_internal (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[5612]:0x2034c1)
at dotnet.native.wasm.get_objref (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[4232]:0x1a37f8)
at dotnet.native.wasm.buffer_add_objid (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[4240]:0x1a4e68)

and before those, one error saying

Invalid UTF-8 leading byte 0x000000fe encountered when deserializing a UTF-8 string in wasm memory to a JS string!

i did pin the SDK version in the global.json, so i would expect both projects to behave the same, runtime-asset wise.

sadly, this is a very big project, so i cannot easily share the code, but i'd be happy to e.g. meet in discord to figure this out. it's not pressing, for now, but i plan to get everything to VS2026 at release date :-)

here's a screenshot:

Image

Expected Behavior

just like when compiling with VS2022, no errors (described above) should appear

Steps To Reproduce

our project is quite old, so i have no idea if this is reproducible with a freshly-created blazor app, i'll try that tomorrow. gotta go sleep now.

Exceptions (if any)

[MONO] /__w/1/s/src/mono/mono/metadata/mono-hash.c:439
Error
at Fc (http://localhost:5240/_framework/dotnet.runtime.st3wwc8rqy.js:3:168832)
at dotnet.native.wasm.wasm_trace_logger (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[32306]:0x90fb71)
at dotnet.native.wasm.eglib_log_adapter (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[2947]:0x1548df)
at dotnet.native.wasm.monoeg_g_logv_nofree (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[2843]:0x151ab0)
at dotnet.native.wasm.monoeg_g_log (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[2845]:0x151bc5)
at dotnet.native.wasm.monoeg_g_log_disabled (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[2846]:0x151c13)
at dotnet.native.wasm.mono_g_hash_table_insert_replace (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[5611]:0x203359)
at dotnet.native.wasm.mono_g_hash_table_insert_internal (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[5612]:0x2034c1)
at dotnet.native.wasm.get_objref (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[4232]:0x1a37f8)
at dotnet.native.wasm.buffer_add_objid (wasm://wasm/dotnet.native.wasm-060f784e:wasm-function[4240]:0x1a4e68)

.NET Version

9.0.305

Anything else?

it's working fine in VS2022 17.14.14 - Enterprise
it's erroring in VS2026 Insiders - Enterprise

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalThis is an issue in a component not contained in this repository. It is open for tracking purposes.area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions