Skip to content

[8.0] RouteHandlerAnalyzer throws InvalidOperationException #50836

Closed
@adamsitnik

Description

@adamsitnik

I've hit the following error while working on Xabaril/AspNetCore.Diagnostics.HealthChecks#2044.

CSC : error AD0001: Analyzer 'Microsoft.AspNetCore.Analyzers.RouteHandlers.RouteHandlerAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'Failed to resolve well-known type 'Microsoft.AspNetCore.Builde
r.EndpointRouteBuilderExtensions'.'. 
PS D:\projects\forks\healthChecks> dotnet --info
.NET SDK:
 Version:   8.0.100-rc.2.23429.6
 Commit:    4bafa2271a

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.100-rc.2.23429.6\

Repro:

git clone https://github.com/adamsitnik/AspNetCore.Diagnostics.HealthChecks.git --branch reproBug reproBug
cd reproBug
dotnet build .\test\HealthChecks.UI.Tests\HealthChecks.UI.Tests.csproj

Metadata

Metadata

Assignees

Labels

analyzerIndicates an issue which is related to analyzer experiencearea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etc

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions