Skip to content

Razor Tooling shows bogus warning for nested 'Frame' tag "Element requires end tag" / "missing matching start tag" #5049

@Eilon

Description

@Eilon

Describe the bug

If you have a tag named Frame (such as by having a file Frame.razor) then if you nest it within itself you get a warning.

This syntax:

<Frame>
    <Frame></Frame>
</Frame>

Gives this pair of warnings:

Severity	Code	Description	Project	File	Line	Suppression State
Warning		Element 'Frame' requires end tag.	BlazorApp1	C:\Users\elipton\source\repos\BlazorApp1\BlazorApp1\Pages\Index.razor	1	
Warning		End tag is missing matching start tag	BlazorApp1	C:\Users\elipton\source\repos\BlazorApp1\BlazorApp1\Pages\Index.razor	3	

image

To Reproduce

  1. File / New Blazor Server Project
  2. Create a file Pages/Frame.razor with any contents (feel free to add a ChildContent to it but it doesn't matter)
  3. Go to another file such as Pages/Index.razor and use the new Frame tag you created, and then try to nest it within itself: <Frame><Frame></Frame></Frame>

And you get green warning squigglies on the outer <Frame> tag. Interestingly, you also don't get Intellisense for the inner Frame tag - it's as if the IDE doesn't want you to type it.

Logs & Exceptions

N/A

Activity log (only needed if VS crashes)

N/A

Language Server logs

Will provide if needed.

Further technical details

Microsoft Visual Studio Enterprise 2019 Preview
Version 16.8.0 Preview 4.0
VisualStudio.16.Preview/16.8.0-pre.4.0+30608.117
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Enterprise

ASP.NET and Web Tools 2019   16.8.544.20707
ASP.NET and Web Tools 2019

ASP.NET Core Razor Language Services   16.1.0.2047412+61e28256c4cc2f7440cda06218667b711c678afd
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2019   16.8.544.20707
For additional information, visit https://www.asp.net/

Pre-requisite checklist

  • Steps to reproduce the issue
  • Razor Language Server client logs included.
  • HTML Language Server client logs included

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions