-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Labels
Milestone
Description
Repro code in any .razor file:
@for(var i = 0; i < 3; i++)
{
var filename = @$"ticket-{i}.png";
<h1>@filename</h1>
}This is legal code as far as I know and used to work without errors or warnings. However in Version 17.11.0 Preview 2.0 this shows an error:
Severity Code Description Project File Line Suppression State Details
Error (active) RZ1009 The "@" character must be followed by a ":", "(", or a C# identifier. If you intended to switch to markup, use an HTML start tag, for example: ...
On my machine this appears in the VS Error UI but does not occur during command-line compilation (probably a slightly older SDK).
FrankRay78, AMUCOMO and ssg