My Blazor Web Assembly app in .NET 7 runs well when I use do.net run
, but when I run it from Visual Studio, I get in the browser console:
The script from “https://localhost:5008/_vs/browserLink” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.
Uncaught SyntaxError: expected expression, got '<'
Of course, it is trying to load a js script from /_vs/browserLink
but it doesn't exist. I do not have a reference to BrowserLink anywhere in my project, and I don't have the browserlink Nuget package either.
This happens in both debugging and running without debugging, on Kestrel.
I upgraded to .NET 7.0.1 (.NET SDK 7.0.101) and no longer have the trouble. Not sure if it was really just a bug fix or if something else changed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.