Skip to content

VS2026 .NET 9 Blazor Component Errors and Debug Loop #63997

@MaddMugsy

Description

@MaddMugsy

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have two .NET 9 Blazor WASM issues, both in VS 2026 build 11109.219. I tried reporting them in the Developer Community portal, but it keeps coming back with a 401 error when I click submit (I'm logged in and a registered VS Pro user).


Issue 1: My solution compiles in successfully in both VS2022 and VS2026. No errors are reported in VS2022, but VS2026 lists errors for every referral to razor components in another class.

For example, in my DialogService class, I'm now seeing one of these two errors for every mention of my ConfirmDialog component:

  • CS0103 The name 'ConfirmDialog' does not exist in the current context

  • CS0246 The type or namespace name 'ConfirmDialog' could not be found (are you missing a using directive or an assembly reference?)

Image

These false errors obfuscate actual errors.

I tried to the usual fix of deleting all the bin+obj folders and deleting the .vs folder, but the errors persist.


Issue 2: When trying to run my Blazor site in debug mode from VS2026, it gets stuck in an Identity authentication loop.

It will continuously hit and break on the "debugger" line below:

export function mono_wasm_runtime_ready (): void {
    INTERNAL.mono_wasm_runtime_is_ready = runtimeHelpers.mono_wasm_runtime_is_ready = true;

    // FIXME: where should this go?
    _next_call_function_res_id = 0;
    _call_function_res_cache = {};
    _debugger_buffer_len = -1;

    // DO NOT REMOVE - magic debugger init function
    if ((<any>globalThis).dotnetDebugger)
        // eslint-disable-next-line no-debugger
        debugger;
}

After it hits that line and I click resume (several times), it will login and go to https://localhost:5551/authentication/login-callback, then it will stop at the line with "debugger" in this script:

( () => {
    let r = ["instantiate", "instantiateStreaming", "compile", "compileStreaming"];
    for (let e of r) {
        let t = WebAssembly[e];
        WebAssembly[e] = function(...n) {
            return t.apply(this, n).then(i => {
                if (!(n[0]instanceof WebAssembly.Module))
                    debugger ;return i
            }
            )
        }
    }
}
)();

Then it will try to login again and loop forever.

I was able to resolve this issue disabling the new mono debugger (both checkboxes).

Expected Behavior

No errors and no login looping.

.NET Version

9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions