question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VS Code shows invalid intellisense errors while working with Blazor

See original GitHub issue

Environment data

dotnet --info .NET SDK (reflecting any global.json): Version: 5.0.301 Commit: ef17233f86

Runtime Environment: OS Name: Windows OS Version: 10.0.19043 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.301\

Host (useful for support): Version: 5.0.7 Commit: 556582d964

.NET SDKs installed: 5.0.201 [C:\Program Files\dotnet\sdk] 5.0.203 [C:\Program Files\dotnet\sdk] 5.0.301 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

VS Code version: 1.57.0 (user setup)

C# Extension version: The version of ms-dotnettools.csharp is v1.23.12

OmniSharp log

Steps to reproduce

Open a shell and write dotnet new blazorwasm -o merhaba cd .\merhaba
code .

Expected behavior

Vs Code should recognize merhaba.Shared namespace. VS Code should recognize App class.

Actual behavior

VS Code shows invalid errors in _Import.razor and Program.cs *** See the attached screen captures *** resim resim

Additional problems from one of other project.

resim

Please note that there is no problem with building and runnig source code.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
jtsomcommented, Jun 28, 2021

Downgrading to v1.23.11 seems to make the issue go away, for me at least. Reinstalling 1.23.12 brings the issue back.

2reactions
mikekiddercommented, Jun 25, 2021

I replicated issue both with .Net 5 and Net 6 preview5 SDK’s. Workaround for me was to revert C# extensions back to 1.23.11 installation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong Intellisense error messages in Blazor
In Blazor Intellisense Error messages are shown that are definitely WRONG and a compile shows no errors (see pic1) Also the squiggly lines...
Read more >
Fixing Visual Studio Intellisense Errors - Rick Strahl's Web Log
I ran into a problem in one of my applications where Visual Studio was showing errors that were clearly not actual errors.
Read more >
Blazor and Visual Studio's Intellisense
When I open my Blazor solution in Visual Studio, Intellisense will show false errors for references to Blazor components, and will ...
Read more >
Visual studio lost intellisense for Blazor Components #4590
After updating vs 16.3.3 visual studio gives errors on markup. Example "Found markup element with unexpected name "EditForm". If this is ...
Read more >
IntelliSense Enhancements for C++ Open Folder and CMake
As you switch between these configurations you will immediately see red squiggles for any code that is unsupported or otherwise invalid for that ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found