From cf7225f2a6692d1488cd5a7f78b842d46395c5eb Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 15 Jan 2026 23:45:05 +0000
Subject: [PATCH 1/3] Initial plan
From 88a2824a65c9f2c17e8e37700879151d746f93ed Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 15 Jan 2026 23:49:54 +0000
Subject: [PATCH 2/3] Fix confusing attribute syntax error message
Remove spaces around {key} placeholder in error message RZ1029 for better clarity.
The error message now shows:
Instead of the confusing:
Updated both the Resources.resx file and all test baselines.
Co-authored-by: dbreshears <3432571+dbreshears@users.noreply.github.com>
---
.../UnderstandsMinimizedAttributes_Block8.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Block9.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Document8.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Document9.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Block8.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Block9.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Document8.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Document9.diag.txt | 2 +-
.../src/Language/Resources.resx | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
index 02d2babdb61..a762901bf6e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
@@ -1,2 +1,2 @@
(1,10): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace.
-(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
index 4a65d020f69..89b241b0cbe 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
@@ -1,2 +1,2 @@
(1,10): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace.
-(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
index 05a21121321..a6aadd9c4b9 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
@@ -1,2 +1,2 @@
(1,8): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace.
-(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
index f3956760645..8f4ccfd749d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
@@ -1,2 +1,2 @@
(1,8): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace.
-(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
index 02d2babdb61..a762901bf6e 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
@@ -1,2 +1,2 @@
(1,10): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace.
-(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
index 4a65d020f69..89b241b0cbe 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
@@ -1,2 +1,2 @@
(1,10): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace.
-(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
index 05a21121321..a6aadd9c4b9 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
@@ -1,2 +1,2 @@
(1,8): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace.
-(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
index f3956760645..8f4ccfd749d 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
@@ -1,2 +1,2 @@
(1,8): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace.
-(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx
index 2f19609b1af..5de355c2f0b 100644
--- a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx
+++ b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx
@@ -462,7 +462,7 @@
Tag helper directive assembly name cannot be null or empty.
- The tag helper attribute '{0}' in element '{1}' is missing a key. The syntax is '<{1} {0}{{ key }}="value">'.
+ The tag helper attribute '{0}' in element '{1}' is missing a key. The syntax is '<{1} {0}{{key}}="value">'.TagHelper attributes must be well-formed.
From 5a8668bfaaf3a87fd782811d57ed6c328e20c846 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 16 Jan 2026 00:52:15 +0000
Subject: [PATCH 3/3] Fix RZ9979 error message - remove confusing spaces
Reverted previous changes to RZ1029 and instead fixed RZ9979 as requested.
Changed '@{{ {0} }}' to '@{{{0}}}' and '{{... }}' to '{{...}}' to remove confusing spaces.
Co-authored-by: chsienki <16246502+chsienki@users.noreply.github.com>
---
.../UnderstandsMinimizedAttributes_Block8.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Block9.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Document8.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Document9.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Block8.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Block9.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Document8.diag.txt | 2 +-
.../UnderstandsMinimizedAttributes_Document9.diag.txt | 2 +-
.../src/Language/Components/ComponentDiagnosticFactory.cs | 4 ++--
.../src/Language/Resources.resx | 2 +-
10 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
index a762901bf6e..02d2babdb61 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
@@ -1,2 +1,2 @@
(1,10): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace.
-(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
index 89b241b0cbe..4a65d020f69 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
@@ -1,2 +1,2 @@
(1,10): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace.
-(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
index a6aadd9c4b9..05a21121321 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
@@ -1,2 +1,2 @@
(1,8): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace.
-(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
index 8f4ccfd749d..f3956760645 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
@@ -1,2 +1,2 @@
(1,8): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace.
-(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
index a762901bf6e..02d2babdb61 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block8.diag.txt
@@ -1,2 +1,2 @@
(1,10): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace.
-(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,10): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
index 89b241b0cbe..4a65d020f69 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Block9.diag.txt
@@ -1,2 +1,2 @@
(1,10): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace.
-(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,10): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
index a6aadd9c4b9..05a21121321 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document8.diag.txt
@@ -1,2 +1,2 @@
(1,8): Error RZ2008: Attribute 'int-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.Int32' cannot be empty or contain only whitespace.
-(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,8): Error RZ1029: The tag helper attribute 'int-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
index 8f4ccfd749d..f3956760645 100644
--- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
+++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/TagHelperBlockRewriterTest/UnderstandsMinimizedAttributes_Document9.diag.txt
@@ -1,2 +1,2 @@
(1,8): Error RZ2008: Attribute 'string-prefix-' on tag helper element 'input' requires a value. Tag helper bound attributes of type 'System.String' cannot be empty or contain only whitespace.
-(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
+(1,8): Error RZ1029: The tag helper attribute 'string-prefix-' in element 'input' is missing a key. The syntax is ''.
diff --git a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Components/ComponentDiagnosticFactory.cs b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Components/ComponentDiagnosticFactory.cs
index 6bd15d93e38..984673dbc78 100644
--- a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Components/ComponentDiagnosticFactory.cs
+++ b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Components/ComponentDiagnosticFactory.cs
@@ -25,9 +25,9 @@ public static RazorDiagnostic Create_UnsupportedTagHelperDirective(SourceSpan? s
public static readonly RazorDiagnosticDescriptor CodeBlockInAttribute =
new($"{DiagnosticPrefix}9979",
- "Code blocks delimited by '@{{...}}' like '@{{ {0} }}' for attributes are no longer supported. " +
+ "Code blocks delimited by '@{{...}}' like '@{{{0}}}' for attributes are no longer supported. " +
"These features have been changed to use attribute syntax. " +
- "Use 'attr=\"@(x => {{... }}\"'.",
+ "Use 'attr=\"@(x => {{...}}\"'.",
RazorDiagnosticSeverity.Error);
public static RazorDiagnostic Create_CodeBlockInAttribute(SourceSpan? source, string expression)
diff --git a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx
index 5de355c2f0b..2f19609b1af 100644
--- a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx
+++ b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx
@@ -462,7 +462,7 @@
Tag helper directive assembly name cannot be null or empty.
- The tag helper attribute '{0}' in element '{1}' is missing a key. The syntax is '<{1} {0}{{key}}="value">'.
+ The tag helper attribute '{0}' in element '{1}' is missing a key. The syntax is '<{1} {0}{{ key }}="value">'.TagHelper attributes must be well-formed.