After upgrading my project to .NET 8 I'm getting tons of these two exceptions shown below when I do my dotnet build command. It compiles without errors, but I get tons of warnings.
It's not giving me any info about where it comes from other than just the csproj file so I'm not sure how to make this reproducible for you.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
CSC : warning AD0001: Analyzer 'Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.RoutePatternAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'Failed to resolve well-known type 'Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions'.'. [C:\Users\grosch\source\repos\newlamp\server\LaMP.API\LaMP.API.csproj]
CSC : warning AD0001: Analyzer 'Microsoft.AspNetCore.Analyzers.RouteHandlers.RouteHandlerAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'Failed to resolve well-known type 'Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions'.'. [C:\Users\grosch\source\repos\newlamp\server\LaMP.API\LaMP.API.csproj]
.NET Version
8.0.100
Anything else?
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.8d38d0cc
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100\
.NET workloads installed:
Workload version: 8.0.100-manifests.8d38d0cc
There are no installed workloads to display.
Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71
.NET SDKs installed:
8.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Is there an existing issue for this?
Describe the bug
After upgrading my project to .NET 8 I'm getting tons of these two exceptions shown below when I do my
dotnet build
command. It compiles without errors, but I get tons of warnings.It's not giving me any info about where it comes from other than just the csproj file so I'm not sure how to make this reproducible for you.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
CSC : warning AD0001: Analyzer 'Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.RoutePatternAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'Failed to resolve well-known type 'Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions'.'. [C:\Users\grosch\source\repos\newlamp\server\LaMP.API\LaMP.API.csproj]
CSC : warning AD0001: Analyzer 'Microsoft.AspNetCore.Analyzers.RouteHandlers.RouteHandlerAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'Failed to resolve well-known type 'Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions'.'. [C:\Users\grosch\source\repos\newlamp\server\LaMP.API\LaMP.API.csproj]
.NET Version
8.0.100
Anything else?
These are my list of references: