Skip to content

Blazor Component called "Script" produces intellisense errors and fails to compile correctly #5267

Closed
@stefanloerwald

Description

@stefanloerwald

Describe the bug

Using a component named Script.razor produces an intellisense error:

In a component, write:

<Script />
  • Intellisense detects it as the script tag (which it isnt):
Element 'Script' is a container element and must have separate closing tag.

To Reproduce

  • Create a component with file name Script.razor. Leave content as default (so that we see whether it's used or not)
  • in Index.razor, add the component: <Script />.
  • Notice the warning

This happens with both 3.1 and 5.0-preview.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions