An unhandled exception has occurred after updating Visual Studio Preview

The following message has started to appear in my Blazor Server Side application:

An unhandled exception has occurred. See browser dev tools for details. Reload 🗙

Using Microsoft Edge the console shows this:

[2020-08-06T20:30:06.055Z] Information: Normalizing '_blazor' to 'http://localhost:5000/_blazor'.
blazor.server.js:1 [2020-08-06T20:30:06.080Z] Information: WebSocket connected to ws://localhost:5000/_blazor?id=bgz2UZClzvMXjGh_fyO8Sg.

Using the Radzen App I created one with an empty page.

Had to edit the _Host file and change the body to:

@(await Html.RenderComponentAsync(RenderMode.Server))
<div id="blazor-error-ui">
    <environment include="Staging,Production">
        An error has occurred. This application may no longer respond until reloaded.
    </environment>
    <environment include="Development">
        An unhandled exception has occurred. See browser dev tools for details.
    </environment>
    <a href="" class="reload">Reload</a>
    <a class="dismiss">🗙</a>
</div>

<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
<script src="_framework/blazor.server.js"></script>

The "blazor-error-ui" was missing from the generated code.

Since my app is research I also had to change the csproj to the following:

<LangVersion>preview</LangVersion>
<TargetFramework>net5.0</TargetFramework>

This only started happening this afternoon after I updated Visual Studio preview to:

Version 16.8.0 Preview 1.0	

The Radzen package reference is:

Radzen.Blazor" Version="2.11.6" 

In my application I have always had Radzen and the "blazor-error-ui" in the _Host.

This only started to appear after I updated to the latest VS Preview.

There are no exceptions showing up in the VS output window or the Browser Dev Tools.

I then used VS Preview to generate its Blazor Server side template, changed to net5.0 and it does not show the exception message.

thanks

peter

Hi @peter.ferrier,

We have not tried yet Radzen.Blazor with .NET Core 5 and latest Visual Studio Preview.