dotnet / source-build

A repository to track efforts to produce a source tarball of the .NET Core SDK and all its components
MIT License
266 stars 132 forks source link

Analyzers throwing all kinds of exceptions during build in VMR #4451

Closed Winniexu01 closed 2 months ago

Winniexu01 commented 4 months ago

Main build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2467853&view=logs&j=b1caa8c7-837c-5a0e-fa2b-360b4dfa6cb4&t=5a647af6-2fef-58c2-4caf-850dc1bc163c

'source-build-reference-packages' failed:

    CSC : error AD0001: Analyzer 'Microsoft.NetCore.CSharp.Analyzers.Runtime.CSharpDetectPreviewFeatureAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'. [/vmr/src/source-build-reference-packages/src/referencePackages/src/system.text.json/7.0.0/System.Text.Json.7.0.0.csproj::TargetFramework=net7.0]
##[error]CSC(0,0): error AD0001: (NETCORE_ENGINEERING_TELEMETRY=Build) Analyzer 'Microsoft.NetCore.CSharp.Analyzers.Runtime.CSharpDetectPreviewFeatureAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
MichaelSimons commented 4 months ago

Using this as a tracking issue until https://github.com/dotnet/roslyn-analyzers/issues/7349 is fixed.

Winniexu01 commented 4 months ago

Add more information, release/9.0.1xx-preview5 build also fails with this issue: https://dev.azure.com/dnceng/internal/_build/results?buildId=2468664&view=logs&j=b1caa8c7-837c-5a0e-fa2b-360b4dfa6cb4&t=5a647af6-2fef-58c2-4caf-850dc1bc163c

mthalman commented 4 months ago

Add more information, release/9.0.1xx-preview5 build also fails with this issue: https://dev.azure.com/dnceng/internal/_build/results?buildId=2468664&view=logs&j=b1caa8c7-837c-5a0e-fa2b-360b4dfa6cb4&t=5a647af6-2fef-58c2-4caf-850dc1bc163c

That build is from main. The builds from release/9.0.1xx-preview5 look to be ok.

akoeplinger commented 3 months ago

I filed https://github.com/dotnet/dnceng/issues/3305 so we can track this as part of Build Analysis

Winniexu01 commented 2 months ago

CentOSStream9_Offline_PreviousSourceBuiltSdk_x64 throws error AD0001 'System.ArgumentNullException' in VMR:

CSC : error AD0001: Analyzer 'Microsoft.NetCore.Analyzers.Runtime.SpecifyIFormatProviderAnalyzer' threw an exception of type 'System.ArgumentNullException' with message 'Value cannot be null. (Parameter 'analyzerConfigOptionsProvider')'. [/vmr/src/vstest/src/vstest.console.arm64/vstest.console.arm64.csproj::TargetFramework=net9.0]

Build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2491911&view=logs&j=2efcdee0-63a0-5f4c-6890-20d889251d12&t=687ca494-57d2-542a-c494-988bec6c615f

mthalman commented 2 months ago

This issue seems resolved. Haven't seen it show up in any recent runs.

akoeplinger commented 2 months ago

We're still seeing this a lot, https://github.com/dotnet/dnceng/issues/3305 has a 24 hour hit count of 18, but it probably doesn't make sense to track this as part of the source-build repo.