Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.AspNetCore.Analyzers.RouteEmbeddedLanguage.RoutePatternAnalyzer warning when .net 8 with framework reference Microsoft.AspNetCore.App #50868

Closed
1 task done
jnormen opened this issue Sep 22, 2023 · 1 comment

Comments

@jnormen
Copy link

jnormen commented Sep 22, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

There seams to be the same problem I can find when on older post about 6 to 7 RC1. But now with .net 7 to .net 8 RC1

when I use a frameworkreference in my project file to Microsoft.AspNetCore.App and target .net 8 (using Rc1 latest).
The analyzer gives a warning:

Severity	Code	Description	Project	File	Line	Suppression State
Error	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'.'

I guess this is something that will be fixed in later on as with .Net 6 to .Net 7 ? So not sure if this is a bug, issue that shall be reported here?

Expected Behavior

No response

Steps To Reproduce

Project with target .net 8

	<LangVersion>preview</LangVersion>
	<TargetFramework>net8.0</TargetFramework>

<ItemGroup>
	<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

Exceptions (if any)

Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions

.NET Version

8.0.100-rc.1.23463.5

Anything else?

No response

@captainsafia
Copy link
Member

captainsafia commented Sep 22, 2023

Thanks for the bug report, @jnormen! I'm closing this in favor of #50836 which was filed first and has enough similarities that it warrants duping.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants