.NET Version 10.
Application Insights V3
The documentation here has a Javascript `<script> block for us to copy/paste into our HTML for Application Insights integration.
When I do so, Visual Studio highlights the entire function plus a large chunk of the HTML above it with the error No overload for method 'write' takes 0 arguments.
If you follow these and it's easy to reproduce:
- Create a new ASP.NET (or Blazor) application.
- Paste the Javascript from the link above into any
cshtml file.
- You should see the error.
Note that if the .cshtml file only contains the script block (i.e. no <html> or <head> tags) then you get another error (RZ1005):
"".concat(n[4]),l=window.fetch,t=function(e){if(!e.ext||!e.ext[i]||!e.ext[i].file)throw Error("" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid.
Not being a Javascript dev, I'm not even going to touch that one 🙂
Note that this causes a compilation error (also tested with CLI dotnet build), so it's not Visual Studio's code insight getting things wrong.
.NET Version 10.
Application Insights V3
The documentation here has a Javascript `<script> block for us to copy/paste into our HTML for Application Insights integration.
When I do so, Visual Studio highlights the entire function plus a large chunk of the HTML above it with the error
No overload for method 'write' takes 0 arguments.If you follow these and it's easy to reproduce:
cshtmlfile.Note that if the
.cshtmlfile only contains the script block (i.e. no<html>or<head>tags) then you get another error (RZ1005):Not being a Javascript dev, I'm not even going to touch that one 🙂
Note that this causes a compilation error (also tested with CLI
dotnet build), so it's not Visual Studio's code insight getting things wrong.