Skip to content

Commit 997393f

Browse files
Copilotstephentoub
andcommitted
Fix logging source generator CS0234 error with FormattableString namespace
Co-authored-by: stephentoub <[email protected]>
1 parent b8794d4 commit 997393f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Emitter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ private void GenStruct(LoggerMethod lm, string nestedIndentation)
177177
string formatMethodBegin =
178178
!lm.Message.Contains('{') ? "" :
179179
_hasStringCreate ? "string.Create(global::System.Globalization.CultureInfo.InvariantCulture, " :
180-
"global::System.Diagnostics.CodeAnalysis.FormattableString.Invariant(";
180+
"global::System.FormattableString.Invariant(";
181181
string formatMethodEnd = formatMethodBegin.Length > 0 ? ")" : "";
182182

183183
_builder.Append($@"

0 commit comments

Comments
 (0)