Skip to content

Razor intellisense not working with tag helpers using custom tag name, attribute and parentTag #11455

Open
@ihor-biletskyi

Description

@ihor-biletskyi

Hi,

I am using Visual Studio Professional 2022 Version 17.12.4

I have the below tag helper class:

[HtmlTargetElement("test", Attributes = "test", ParentTag = "div")]
public class TestTagHelper : TagHelper
{
    [HtmlAttributeName("test")]
    public bool MyProperty { get; set; }
}

The razor page syntax:

<div>
    <test></test>
</div>

IntelliSense does not pop up the test attribute.

Image

Removing the parent tag solves the issue

Image

The same issue reproduces in the VS Code with the C# Dev Kit extension

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions