Skip to content

Blazor WebAssembly: "An unhandled error has occurred. Reload" since .NET 8.0.5 #102307

@ghost

Description

Description

Since the update of Visual Studio to version 17.9.7 and .NET 8.0.5, an error is produced when starting Blazor Webassembly applications in release mode in the Edge Browser from Visual Studio ("An unhandled error has occurred. Reload").
This error occurs with all Blazor Webassembly applications.
To reproduce it, I created a completely new and empty Blazor Webassembly app. The error occurs even without any changes.

blazor_error

An example project can be found here:
https://github.com/Coding-Victim/BlazorApp1

Reproduction Steps

Create an empty Blazor WebAssembly project, select "Release", start the project with the MS Edge browser (newest Version)

Expected behavior

The empty WebAssembly app starts without any problems

Actual behavior

The empty WebAssembly app starts, but the MS Edge shows the message: "An unhandled error has occurred. Reload"

In the HTML, style="display: block;" is automatically added to the line

. This actually only happens if an exception is thrown. Since .NET 8.0.5, this already happens when the empty project is started through Visual Studio with MS Edge browser.

Regression?

In .NET 8.0.4 it worked in all projects without any problems

Known Workarounds

No response

Configuration

.NET 8.0.5
Visual Studio 2022 (v17.9.7)
Windows 10 and 11
MS Edge

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions