VS Code shows invalid intellisense errors while working with Blazor
See original GitHub issueEnvironment 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 ***
Additional problems from one of other project.
Please note that there is no problem with building and runnig source code.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:18 (9 by maintainers)
Top GitHub Comments
Downgrading to v1.23.11 seems to make the issue go away, for me at least. Reinstalling 1.23.12 brings the issue back.
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.