Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

blazor webassembly error: cannot read properties if undefined (reading 'dotnet.wasm')

$
0
0

The question is obvious: how to fix the cited error message from the title. In the first part I show a picture of the generated error message and I explain the undertaken steps to provoke said error message.


I've some problems deploying a blazor wasm app to a server on a website subdomain.

As that didn't work out, I thaught, let's go step by step, and try to deploy the microsoft sample (the counter application) to the subdomain.

That initially worked out and I tried consequently to deploy a more complicated application to the subdomain.

That still didn't work out, and I placed the counter application back. Just to check. Being unpleasantly surprised to have this message when I ran the application locally.

launching the website

error message

I than consulted following SO-topic

It is true that when trying and erring with deployments I added and removed .Net sdk's (bundles)

I ran the most recent .Net bundle again. And restarted IIS.

sdk repair

No change.

I looked at the application and although the application was targetting .net 8, and was up to date on 8.0.4, the packages Microsoft.AspNetCore.Components.WebAssembly and Microsoft.AspNetCore.Components.WebAssembly.DevServer were still on 8.0.2 so I upgraded them to 8.0.4.

nuget packages

I also checked the targeted framework.

csproj

Removed bin- and obj-folders, and republished again. And deployed again. But the error message remained.


Viewing all articles
Browse latest Browse all 4839

Trending Articles