Skip to content

[10.0-preview.1] ASP.NET RouteHandlerAnalyzer - System.IndexOutOfRangeException #60719

Closed
@erwinkramer

Description

@erwinkramer

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I see some warnings like:

CSC : warning AD0001: Analyzer 'Microsoft.AspNetCore.Analyzers.RouteHandlers.RouteHandlerAnalyzer' threw an exception of type 'System.IndexOutOfRangeException' with message 'Index was outside the bounds of the array.'. [c:\Users\erwin\bank-api\BankApi.Service.Stable\BankApi.Service.Stable.csproj]

When i build the .NET 10 version of my project: https://github.com/erwinkramer/bank-api/tree/feature/dotnet10, it didn't happen on .NET 9. See the diff here: https://github.com/erwinkramer/bank-api/pull/6/files

Expected Behavior

Should just be as .NET 9, no warnings.

Steps To Reproduce

Build .NET 9 version on: https://github.com/erwinkramer/bank-api/tree/main - this doesn't throw the warnings
Build .NET 10 version on: https://github.com/erwinkramer/bank-api/tree/feature/dotnet10 - this throws the warnings

Exceptions (if any)

No response

.NET Version

10.0.100-preview.1.25120.13

Anything else?

Using VS Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    analyzerIndicates an issue which is related to analyzer experiencearea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etchelp wantedUp for grabs. We would accept a PR to help resolve this issue

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions