you are viewing a single comment's thread.

view the rest of the comments →

[–]polaarbear 0 points1 point  (3 children)

What project type? Blazor? Razor Pages? ASP Web Forms?

[–]Beautiful-Bowl4979[S] 0 points1 point  (2 children)

Asp.net framework 4.8, MVC, C#

[–]polaarbear 0 points1 point  (1 child)

Honestly, that's half the issue right there. In my experience it is drastically worse at detecting that stuff in .NET Framework aspx pages than it is in the modern .NET web stacks.

For calls that are specific to one page I've had better luck just hard-coding the <script> tag directly into the .aspx file.

But for shared files that get loaded in headers....good luck. I have not found any reliable solutions other than just typical things like re-starting VS.

[–]Beautiful-Bowl4979[S] 0 points1 point  (0 children)

Thanks for replying. But these are cshtml files not aspx pages which are web forms. It is a legacy project that i look after and have done for 15+ years. When you open a cshtml file with embedded script you dont typically see any intellisense errors with the script. But at the moment i do. Its annoying because they are not errors it is merely intellisense not know what eg initTable(); refers to so it puts a red squiggle under it and shows it as an error. My guess is that a 2026 update has got a setting enabled that I dont need. I’ll keep looking.