diff --git a/src/Analyzers/Microsoft.AspNetCore.Analyzer.Testing/src/DiagnosticVerifier.cs b/src/Analyzers/Microsoft.AspNetCore.Analyzer.Testing/src/DiagnosticVerifier.cs index a67eda76c9..d56178e0e2 100644 --- a/src/Analyzers/Microsoft.AspNetCore.Analyzer.Testing/src/DiagnosticVerifier.cs +++ b/src/Analyzers/Microsoft.AspNetCore.Analyzer.Testing/src/DiagnosticVerifier.cs @@ -195,18 +195,17 @@ namespace Microsoft.AspNetCore.Analyzer.Testing if (File.Exists(dll)) { assemblies.Add(dll); - return true; + continue; } dll = Path.Combine(Directory.GetCurrentDirectory(), Path.GetFileName(assembly)); if (File.Exists(dll)) { assemblies.Add(dll); - return true; } } - return false; + return assemblies.Count > 0; } } }