dotnet / dotnet/roslyn

Incorrectly raising of RZ10017 for HTML elements (and syntax highlighting)

Open
#85,616 0 comments 0 reactions 0 assignees View on GitHub
Area-Razor Area-Razor-Compiler
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

When attempting to use `bind-Value:get` and `bind-Value:set` on an HTML element, the incorrect error RZ10017 is flagged.
This doesn't make sense, because the companion `bind-Value:set` attribute is present, but both are being applied incorrectly to an HTML element.

### Expected Behavior

A more correct error would indicate that attribute `@bind-Value` isn't valid for an HTML element. However, the syntax-highlighting also suggests that it is valid.

Image

### Steps To Reproduce

`net8.0`

### Exceptions (if any)

_No response_

### .NET Version

10.0.0-preview.5.25277.114

### Anything else?

Visual Studio 2022 Preview 17.14.8 Preview 1.0.

Host:
Version: 10.0.0-preview.5.25277.114
Architecture: x64
Commit: ddf39a1b46

.NET SDKs installed:
8.0.411
9.0.302
10.0.100-preview.5.25277.114

.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.20
Microsoft.AspNetCore.App 8.0.16
Microsoft.AspNetCore.App 8.0.17
Microsoft.AspNetCore.App 8.0.18
Microsoft.AspNetCore.App 9.0.7
Microsoft.AspNetCore.App 10.0.0-preview.5.25277.114
Microsoft.NETCore.App 7.0.20
Microsoft.NETCore.App 8.0.16
Microsoft.NETCore.App 8.0.17
Microsoft.NETCore.App 8.0.18
Microsoft.NETCore.App 9.0.5
Microsoft.NETCore.App 9.0.7
Microsoft.NETCore.App 10.0.0-preview.5.25277.114
Microsoft.WindowsDesktop.App 7.0.20
Microsoft.WindowsDesktop.App 8.0.16
Microsoft.WindowsDesktop.App 8.0.17
Microsoft.WindowsDesktop.App 8.0.18
Microsoft.WindowsDesktop.App 9.0.5
Microsoft.WindowsDesktop.App 9.0.7
Microsoft.WindowsDesktop.App 10.0.0-preview.5.25277.114

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.