razor: VSCode raise warning "Found markup element with unexpected name"

Is this a Bug or Feature request?:

Bug

Steps to reproduce

  1. open new terminal and execute dotnet new blazorserver -n Blazor1
  2. Launch VSCode on new created folder
  3. Edit the Pages/Index.razor

Description of the problem:

The <PageTitle> element and <SurveyPrompt> element are not recognized

image

Expected behavior:

The <PageTitle> element and <SurveyPrompt> element are correctly recognized

Actual behavior:

The IntelliSense raise warning

Logs

OmniSharp

Starting OmniSharp server at 25/12/2021, 17:56:54 Target: d:\Developz\Temp\Blazor1

OmniSharp server started. Path: C:/Users/massimo/scoop/apps/omnisharp/current/omnisharp.exe PID: 14200

    Starting OmniSharp on Windows 6.2.9200.0 (x64)
    Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
    Using the 'dotnet' on the PATH.
    DotNetPath set to dotnet
    Located 2 MSBuild instance(s)
        1: Visual Studio Enterprise 2019 16.11.31702.278 16.11.0 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
        2: StandAlone 17.0.0 - "C:\Users\massimo\scoop\apps\omnisharp\current\.msbuild\Current\Bin"
    Registered MSBuild instance: Visual Studio Enterprise 2019 16.11.31702.278 16.11.0 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
    Detecting Cake files in 'd:\Developz\Temp\Blazor1'.
    Did not find any Cake files
    No solution files found in 'd:\Developz\Temp\Blazor1'
    Queue project update for 'd:\Developz\Temp\Blazor1\Blazor1.csproj'
    Detecting CSX files in 'd:\Developz\Temp\Blazor1'.
    Did not find any CSX files
    Configuration finished.
    Omnisharp server running using Stdio at location 'd:\Developz\Temp\Blazor1' on host 6600.
    Loading project: d:\Developz\Temp\Blazor1\Blazor1.csproj
    Targeting .NET 6.0 in Visual Studio 2019 is not supported.
    Successfully loaded project file 'd:\Developz\Temp\Blazor1\Blazor1.csproj'.

d:\Developz\Temp\Blazor1\Blazor1.csproj C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(134,5): Error: Targeting .NET 6.0 in Visual Studio 2019 is not supported.

    Adding project 'd:\Developz\Temp\Blazor1\Blazor1.csproj'
    Failed to add project to workspace: 'd:\Developz\Temp\Blazor1\Blazor1.csproj'
    Could not locate project in workspace: d:\Developz\Temp\Blazor1\Blazor1.csproj
    Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\Counter.razor__virtual.cs added to workspace
    Solution initialized -> queue all documents for code analysis. Initial document count: 1.
    Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\Error.cshtml__virtual.cs added to workspace
    Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\FetchData.razor__virtual.cs added to workspace
    Miscellaneous file: d:\Developz\Temp\Blazor1\Shared\MainLayout.razor__virtual.cs added to workspace
    ************ Request ************

{ “Type”: “request”, “Seq”: 69, “Command”: “/filesChanged”, “Arguments”: [ { “FileName”: “d:\Developz\Temp\Blazor1\obj\Debug\net6.0\Blazor1.GeneratedMSBuildEditorConfig.editorconfig”, “changeType”: “Change” } ] } fail: OmniSharp.Stdio.Host ************ Response (28.5175ms) ************ { “Request_seq”: 69, “Command”: “/filesChanged”, “Running”: true, “Success”: false, “Message”: “"System.NullReferenceException: Object reference not set to an instance of an object.\r\n at OmniSharp.MSBuild.ProjectManager.UpdateAnalyzerConfigFile(Project project, String analyzerConfigFile) in D:\\a\\1\\s\\src\\OmniSharp.MSBuild\\ProjectManager.cs:line 606\r\n at OmniSharp.MSBuild.ProjectManager.UpdateAnalyzerConfigFile(ProjectFileInfo projectFileInfo, String analyzerConfigFile, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.MSBuild\\ProjectManager.cs:line 572\r\n at OmniSharp.FileWatching.ManualFileSystemWatcher.Callbacks.Invoke(String filePath, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.Host\\FileWatching\\ManualFileSystemWatcher.Callbacks.cs:line 22\r\n at OmniSharp.FileWatching.ManualFileSystemWatcher.Notify(String filePath, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.Host\\FileWatching\\ManualFileSystemWatcher.cs:line 43\r\n at OmniSharp.Roslyn.CSharp.Services.Files.OnFilesChangedService.Handle(IEnumerable1 requests) in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\Files\\\\OnFilesChangedService.cs:line 27\\r\\n at OmniSharp.Endpoint.EndpointHandler2.<AggregateResponsesFromLanguageHandlers>d__18.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:line 164\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Endpoint.EndpointHandler2.<HandleRequestForLanguage>d__20.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:line 227\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at OmniSharp.Endpoint.EndpointHandler2.<Process>d__16.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:line 138\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Stdio.Host.<HandleRequest>d__14.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Stdio\\Host.cs:line 218"”, “Body”: null, “Seq”: 116, “Type”: “response” } info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages_Host.cshtml__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages_Layout.cshtml__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\Counter.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\Error.cshtml__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\FetchData.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\Index.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Shared\NavMenu.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Shared\SurveyPrompt.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1_Imports.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\App.razor__virtual.cs added to workspace warn: OmniSharp.Stdio.Host ************ Request ************ { “Type”: “request”, “Seq”: 173, “Command”: “/filesChanged”, “Arguments”: [ { “FileName”: “d:\Developz\Temp\Blazor1\obj\Debug\net6.0\Blazor1.GeneratedMSBuildEditorConfig.editorconfig”, “changeType”: “Change” } ] } fail: OmniSharp.Stdio.Host ************ Response (0.8337ms) ************ { “Request_seq”: 173, “Command”: “/filesChanged”, “Running”: true, “Success”: false, “Message”: “"System.NullReferenceException: Object reference not set to an instance of an object.\r\n at OmniSharp.MSBuild.ProjectManager.UpdateAnalyzerConfigFile(Project project, String analyzerConfigFile) in D:\\a\\1\\s\\src\\OmniSharp.MSBuild\\ProjectManager.cs:line 606\r\n at OmniSharp.MSBuild.ProjectManager.UpdateAnalyzerConfigFile(ProjectFileInfo projectFileInfo, String analyzerConfigFile, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.MSBuild\\ProjectManager.cs:line 572\r\n at OmniSharp.FileWatching.ManualFileSystemWatcher.Callbacks.Invoke(String filePath, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.Host\\FileWatching\\ManualFileSystemWatcher.Callbacks.cs:line 22\r\n at OmniSharp.FileWatching.ManualFileSystemWatcher.Notify(String filePath, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.Host\\FileWatching\\ManualFileSystemWatcher.cs:line 43\r\n at OmniSharp.Roslyn.CSharp.Services.Files.OnFilesChangedService.Handle(IEnumerable1 requests) in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\Files\\\\OnFilesChangedService.cs:line 27\\r\\n at OmniSharp.Endpoint.EndpointHandler2.<AggregateResponsesFromLanguageHandlers>d__18.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:line 164\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Endpoint.EndpointHandler2.<HandleRequestForLanguage>d__20.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:line 227\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at OmniSharp.Endpoint.EndpointHandler2.<Process>d__16.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:line 138\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Stdio.Host.<HandleRequest>d__14.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Stdio\\Host.cs:line 218"”, “Body”: null, “Seq”: 248, “Type”: “response” } info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\PageTitle.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\Index.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\PageTitle.razor__virtual.cs added to workspace warn: OmniSharp.Stdio.Host ************ Request ************ { “Type”: “request”, “Seq”: 207, “Command”: “/filesChanged”, “Arguments”: [ { “FileName”: “d:\Developz\Temp\Blazor1\obj\Debug\net6.0\Blazor1.GeneratedMSBuildEditorConfig.editorconfig”, “changeType”: “Change” } ] } fail: OmniSharp.Stdio.Host ************ Response (0.7167ms) ************ { “Request_seq”: 207, “Command”: “/filesChanged”, “Running”: true, “Success”: false, “Message”: “"System.NullReferenceException: Object reference not set to an instance of an object.\r\n at OmniSharp.MSBuild.ProjectManager.UpdateAnalyzerConfigFile(Project project, String analyzerConfigFile) in D:\\a\\1\\s\\src\\OmniSharp.MSBuild\\ProjectManager.cs:line 606\r\n at OmniSharp.MSBuild.ProjectManager.UpdateAnalyzerConfigFile(ProjectFileInfo projectFileInfo, String analyzerConfigFile, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.MSBuild\\ProjectManager.cs:line 572\r\n at OmniSharp.FileWatching.ManualFileSystemWatcher.Callbacks.Invoke(String filePath, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.Host\\FileWatching\\ManualFileSystemWatcher.Callbacks.cs:line 22\r\n at OmniSharp.FileWatching.ManualFileSystemWatcher.Notify(String filePath, FileChangeType changeType) in D:\\a\\1\\s\\src\\OmniSharp.Host\\FileWatching\\ManualFileSystemWatcher.cs:line 43\r\n at OmniSharp.Roslyn.CSharp.Services.Files.OnFilesChangedService.Handle(IEnumerable1 requests) in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\Files\\\\OnFilesChangedService.cs:line 27\\r\\n at OmniSharp.Endpoint.EndpointHandler2.<AggregateResponsesFromLanguageHandlers>d__18.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:line 164\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Endpoint.EndpointHandler2.<HandleRequestForLanguage>d__20.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:line 227\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at OmniSharp.Endpoint.EndpointHandler2.<Process>d__16.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:line 138\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Stdio.Host.<HandleRequest>d__14.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Stdio\\Host.cs:line 218"”, “Body”: null, “Seq”: 303, “Type”: “response” } info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\FetchData.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\Index.razor__virtual.cs added to workspace info: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\Developz\Temp\Blazor1\Pages\Index.razor__virtual.cs added to workspace

Razor

Expand

[Client - 18:10:43] -- Starting Issue Data Collection-- 
[Client - 18:10:45] -- Stopping Issue Data Collection-- 

Workspace information

Razor document:

Expand

Non Razor file as active document

Projected CSharp document:

Expand

Could not determine CSharp content

Projected Html document:

Expand

Could not determine Html content

Machine information

VSCode version: 1.63.2 Razor.VSCode version: 1.23.17

dotnet --info

Expand

.NET SDK (reflecting any global.json):
 Version:   6.0.101
 Commit:    ef49f6213a

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

Host (useful for support):
  Version: 6.0.1
  Commit:  3a25a7f1cc

.NET SDKs installed:
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.818 [C:\Program Files\dotnet\sdk]
  2.2.402 [C:\Program Files\dotnet\sdk]
  3.1.403 [C:\Program Files\dotnet\sdk]
  3.1.416 [C:\Program Files\dotnet\sdk]
  5.0.104 [C:\Program Files\dotnet\sdk]
  5.0.210 [C:\Program Files\dotnet\sdk]
  5.0.303 [C:\Program Files\dotnet\sdk]
  5.0.401 [C:\Program Files\dotnet\sdk]
  5.0.404 [C:\Program Files\dotnet\sdk]
  6.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.22 [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.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.22 [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.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.22 [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.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Extensions

Expand

Extension Author Version
auto-using Fudge 0.7.15
azure-account ms-vscode 0.9.11
azurecli ms-vscode 0.5.0
code-settings-sync Shan 3.4.3
color-highlight naumovs 2.5.0
csharp ms-dotnettools 1.23.17
debugger-for-edge msjsdiag 1.0.15
docthis joelday 0.7.1
dotnet-core-add solidcube 0.1.2
dotnet-test-explorer formulahendry 0.7.7
eslint-disable-snippets drKnoxy 1.3.0
fluent-icons miguelsolorio 0.0.15
git-graph mhutchie 1.30.0
github-vscode-theme GitHub 5.1.0
gitlens eamodio 11.7.0
markdown-all-in-one yzhang 3.4.0
material-icon-theme PKief 4.11.0
msbuild-project-tools tintoy 0.4.3
mssql ms-mssql 1.12.0
npm-intellisense christian-kohler 1.4.0
nugetpackagemanagergui aliasadidev 1.1.9
numbered-bookmarks alefragnani 8.1.0
output-colorizer IBM 0.1.2
powershell ms-vscode 2021.12.0
prettier-vscode esbenp 9.0.0
project-manager alefragnani 12.4.0
rainbow-csv mechatroner 2.0.0
remote-containers ms-vscode-remote 0.209.6
remote-ssh ms-vscode-remote 0.70.0
remote-ssh-edit ms-vscode-remote 0.70.0
remote-ssh-explorer ms-vscode-remote 0.56.0
remote-wsl ms-vscode-remote 0.63.13
test-adapter-converter ms-vscode 0.1.5
theme-dracula dracula-theme 2.24.1
todo-tree Gruntfuggly 0.0.214
trxviewer scabana 1.0.1
user-secrets adrianwilczynski 2.0.1
vetur octref 0.35.0
vsc-community-material-theme Equinusocio 1.4.2
vsc-material-theme Equinusocio 33.1.2
vscode-docker ms-azuretools 1.18.0
vscode-drawio hediet 1.6.3
vscode-eslint dbaeumer 2.2.2
vscode-import-cost wix 2.15.0
vscode-markdownlint DavidAnson 0.45.0
vscode-nuget-gallery patcx 0.0.24
vscode-nupkg eridem 1.0.1
vscode-remote-extensionpack ms-vscode-remote 0.21.0
vscode-taskexplorer spmeesseman 2.5.7
vscode-theme-onedark akamud 2.2.3
vscode-thunder-client rangav 1.9.1
vscode-versionlens pflannery 1.0.9
vscode-wakatime WakaTime 18.0.2
vscode-yaml redhat 1.2.2
vscodeintellicode VisualStudioExptTeam 1.2.15
vtpw snovakovic 0.1.2
Vue2 ducksoupdev 0.1.3
xml DotJoshJohnson 2.5.1

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 18 (3 by maintainers)

Most upvoted comments

I’m trying to create my first MAUI Blazor app and hitting these issues on macOS.

Workarounds above didn’t help. Tried deleting obj and bin with rebuilds and nothing helped.

image

In my case it was the C# extension(ms-dotnettools.csharp). I started seeing the issue after updated from v1.26.0 to v2.0.376. I resolved it by reverting back to v1.26.0

I was able to get around this by adding @namespace Mobile.Shared to every file in the shared directory. Something buggy is going on.

I had exact same issue is Visual Studio/Visual studio code.

Solution for already broken file a. Visual studio: Right click on broken .razor file -> Properties -> Build Action -> “Content”. b. Visual studio code: .csproj file -> Manually remove lines:

  <ItemGroup>
    <Content Remove="PathToComponent\Component.razor" />
  </ItemGroup>

  <ItemGroup>
    <None Include="PathToComponent\Component.razor" />
  </ItemGroup>

If after that change project wont compile, made sure .razor.cs file is partial class.

How to prevent this from happening Visual studio (Communnity 2022 [17.2.5]) keep adding these (b.) to csproj every time I create .razor file. To prevent this I added

  <ItemGroup>
    <Content Include="..\**\*.razor" />
  </ItemGroup>

to .csrpoj file.

If you are using vs. Exclude the new file from the project and include it again: this mostly happens with newly created files

Update

The issue also occurs after some time of coding, to mitigate the issue I delete obj and bin folders and the issue the command dotnet build and restart OmniSharp.

Does clearing bin and obj fix the issue?

Yes

Also it looks like O# is throwing a null-ref. Perhaps that’s causing design time completion to be incorrect?

I don’t know