Skip to content

ProvideCorrectArgumentsToFormattingMethodsAnalyzer throws IndexOutOfRangeException when building Microsoft.Extensions.Logging.Abstractions #90357

@ericstj

Description

@ericstj

Description

When building Microsoft.Extensions.Logging.Abstractions I see the diagnostic

error AD0001: Analyzer 'Microsoft.NetCore.Analyzers.Runtime.ProvideCorrectArgumentsToFormattingMethodsAnalyzer' threw an exception of type 'System.IndexOutOfRangeException' with message 'Index was outside the bounds of the array.'

I'll suppress this when enabling AD0001 as warning. This issue will track fixing that analyzer and removing the warning suppression

Reproduction Steps

Remove AD0001 from Microsoft.Extensions.Logging.Abstractions.csproj and build it.

Expected behavior

Builds without warning.

Actual behavior

Warning as above

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

area-Metacode-analyzerMarks an issue that suggests a Roslyn analyzer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions