Describe the bug
Since preview of 8.0.400 and now also in final version of 8.0.400 compilation of razor pages containing @@ fail with:
FileName.cshtml: error CS9008: Sequence of '@' characters is not allowed. A verbatim string or identifier can only have one '@' character and a raw string cannot have any.
To Reproduce
Any Razor page with code like this fails:
@{ var validationMessage = @Html.ValidationMessage(Model.Binding, "", new { @@class = "invalid-feedback" }, "div"); }
Changing from @@Class to @Class makes the dotNet compilation work, but then the Razor compilation fails with:
Error RZ1007: "class" is a reserved word and cannot be used in implicit expressions. An explicit expression ("@()") must be used.
Describe the bug
Since preview of 8.0.400 and now also in final version of 8.0.400 compilation of razor pages containing @@ fail with:
FileName.cshtml: error CS9008: Sequence of '@' characters is not allowed. A verbatim string or identifier can only have one '@' character and a raw string cannot have any.
To Reproduce
Any Razor page with code like this fails:
@{ var validationMessage = @Html.ValidationMessage(Model.Binding, "", new { @@class = "invalid-feedback" }, "div"); }Changing from @@Class to @Class makes the dotNet compilation work, but then the Razor compilation fails with:
Error RZ1007: "class" is a reserved word and cannot be used in implicit expressions. An explicit expression ("@()") must be used.