Skip to content

Commit 9231c48

Browse files
committed
Ignore warning normally suppressed by SDK
1 parent cab2243 commit 9231c48

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/NServiceBus.AzureFunctions.SourceGenerator.Tests/SourceGeneratorApprovals.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,11 @@ static CSharpCompilation Compile(IEnumerable<SyntaxTree> syntaxTrees, IEnumerabl
229229
// Verify the code compiled:
230230
var compilationErrors = compilation
231231
.GetDiagnostics()
232-
.Where(d => d.Severity >= DiagnosticSeverity.Warning);
232+
.Where(d => d.Severity >= DiagnosticSeverity.Warning)
233+
// Ignoring warning CS1701: Assuming Microsoft.Extensions.Logging.Abstractions v6 and v8 are the same thing
234+
// because component targets net6 while tests are now net8. SDK suppresses this for you but hits here due
235+
// to direct compiler invocation. See https://github.com/dotnet/roslyn/issues/19640
236+
.Where(d => d.Id != "CS1701"); //
233237
Assert.IsEmpty(compilationErrors, compilationErrors.FirstOrDefault()?.GetMessage());
234238

235239
return compilation;

0 commit comments

Comments
 (0)