Skip to content

Update pragma warnings to also suppress CS9360 in tests

0c2251a
Select commit
Loading
Failed to load commit list.
Open

Fix CS8618 suggesting 'required' on events #82424

Update pragma warnings to also suppress CS9360 in tests
0c2251a
Select commit
Loading
Failed to load commit list.
Azure Pipelines / roslyn-CI failed Feb 18, 2026 in 1h 32m 53s

Build #20260218.16 had test failures

Details

Tests

  • Failed: 17 (0.00%)
  • Passed: 949,266 (98.85%)
  • Other: 11,069 (1.15%)
  • Total: 960,352

Annotations

Check failure on line 188 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Build log #L188

(NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed

Check failure on line 198 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Build log #L198

PowerShell exited with code '1'.

Check failure on line 207 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Build log #L207

(NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed

Check failure on line 217 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Build log #L217

PowerShell exited with code '1'.

Check failure on line 1 in Microsoft.CodeAnalysis.CSharp.Analyzers.UnitTests.MakeMemberRequired.MakeMemberRequiredTests.NotOnEventDeclaration

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Microsoft.CodeAnalysis.CSharp.Analyzers.UnitTests.MakeMemberRequired.MakeMemberRequiredTests.NotOnEventDeclaration

System.InvalidOperationException : Context: Diagnostics of test state
Expected diagnostic id to be "CS8618" was "CS9360"

Expected diagnostic:
    // /0/Test0.cs(5,38,5,45): error CS8618
DiagnosticResult.CompilerError("CS8618").WithSpan(5, 38, 5, 45),

Actual diagnostic:
    // /0/Test0.cs(5,38): error CS9360: Non-nullable event 'MyEvent' must contain a non-null value when exiting constructor. Consider declaring the event as nullable.
DiagnosticResult.CompilerError("CS9360").WithSpan(5, 38, 5, 45).WithSpan(5, 38, 5, 45).WithArguments("event", "MyEvent"),

Raw output
   at Microsoft.CodeAnalysis.Testing.DefaultVerifier.Equal[T](T expected, T actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DefaultVerifier.cs:line 79
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticResults(IEnumerable`1 actualResults, ImmutableArray`1 analyzers, DiagnosticResult[] expectedResults, IVerifier verifier) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 605
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticsAsync(EvaluatedProjectState primaryProject, ImmutableArray`1 additionalProjects, DiagnosticResult[] expected, IVerifier verifier, CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 451
   at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.RunImplAsync(CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 311
   at Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions.CSharpCodeFixVerifier`2.Test.RunImplAsync(CancellationToken cancellationToken) in /_/src/Features/DiagnosticsTestUtilities/CodeActions/CSharpCodeFixVerifier`2+Test.cs:line 93
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.RunAsync(CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 174
--- End of stack trace from previous location ---

Check failure on line 1 in workitem_3.WorkItemExecution

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

workitem_3.WorkItemExecution

The Helix Work Item failed. Often this is due to a test crash. Please see the 'Artifacts' tab above for additional logs.

Check failure on line 1 in Microsoft.CodeAnalysis.CSharp.Analyzers.UnitTests.MakeMemberRequired.MakeMemberRequiredTests.NotOnEventDeclaration

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

Microsoft.CodeAnalysis.CSharp.Analyzers.UnitTests.MakeMemberRequired.MakeMemberRequiredTests.NotOnEventDeclaration

System.InvalidOperationException : Context: Diagnostics of test state
Expected diagnostic id to be "CS8618" was "CS9360"

Expected diagnostic:
    // /0/Test0.cs(5,38,5,45): error CS8618
DiagnosticResult.CompilerError("CS8618").WithSpan(5, 38, 5, 45),

Actual diagnostic:
    // /0/Test0.cs(5,38): error CS9360: Non-nullable event 'MyEvent' must contain a non-null value when exiting constructor. Consider declaring the event as nullable.
DiagnosticResult.CompilerError("CS9360").WithSpan(5, 38, 5, 45).WithSpan(5, 38, 5, 45).WithArguments("event", "MyEvent"),

Raw output
   at Microsoft.CodeAnalysis.Testing.DefaultVerifier.Equal[T](T expected, T actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DefaultVerifier.cs:line 79
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticResults(IEnumerable`1 actualResults, ImmutableArray`1 analyzers, DiagnosticResult[] expectedResults, IVerifier verifier) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 605
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticsAsync(EvaluatedProjectState primaryProject, ImmutableArray`1 additionalProjects, DiagnosticResult[] expected, IVerifier verifier, CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 451
   at Microsoft.CodeAnalysis.Testing.CodeFixTest`1.RunImplAsync(CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.CodeFix.Testing/CodeFixTest`1.cs:line 311
   at Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions.CSharpCodeFixVerifier`2.Test.RunImplAsync(CancellationToken cancellationToken) in /_/src/Features/DiagnosticsTestUtilities/CodeActions/CSharpCodeFixVerifier`2+Test.cs:line 93
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.RunAsync(CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 174
--- End of stack trace from previous location ---

Check failure on line 1 in workitem_5.WorkItemExecution

See this annotation in the file changed.

@azure-pipelines azure-pipelines / roslyn-CI

workitem_5.WorkItemExecution

The Helix Work Item failed. Often this is due to a test crash. Please see the 'Artifacts' tab above for additional logs.