From 8ff8ce2b9a2208ee39c2646d6659aa669c5962cb Mon Sep 17 00:00:00 2001 From: Chris Sienkiewicz Date: Tue, 21 Oct 2025 11:46:14 -0700 Subject: [PATCH] Update generator type check to use FullName We have a check to detect when ALC redirection is not working correctly, unfortunately that check was checking the wrong name so we never hit it. --- .../ProjectSystem/GeneratorRunResult.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/GeneratorRunResult.cs b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/GeneratorRunResult.cs index 8332a80a3b7..0ba9b367fe2 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/GeneratorRunResult.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/GeneratorRunResult.cs @@ -63,7 +63,7 @@ public static async Task CreateAsync(bool throwIfNotFound, P { if (throwIfNotFound) { - if (result.Results.SingleOrDefault(r => r.Generator.GetGeneratorType().Name == "Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator").Generator is { } wrongGenerator) + if (result.Results.SingleOrDefault(r => r.Generator.GetGeneratorType().FullName == "Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator").Generator is { } wrongGenerator) { // Wrong ALC? throw new InvalidOperationException(SR.FormatRazor_source_generator_reference_incorrect(wrongGenerator.GetGeneratorType().Assembly.Location, typeof(RazorSourceGenerator).Assembly.Location, project.Name));