question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with Blazor and MVC parts after updating to .NET 6 (Matches, Compiled descriptor)

See original GitHub issue

I wanted to upgrade .NET to latest version so my solution is up to date but I encountered two errors. Problems started when I upgraded microsoft.aspnetcore.mvc.razor.runtimecompilation 5.0.3 TO 6.0.0-preview.1.21103.6. When I downgrade back both issues disappear.

If you would like to see project’s code I can try to upload some sources.

For every Blazor page:

AmbiguousMatchException: The request matched multiple endpoints. Matches: /_Host /_Host
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(CandidateState[] candidateState)
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ProcessFinalCandidates(HttpContext httpContext, CandidateState[] candidateState)
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.Select(HttpContext httpContext, CandidateState[] candidateState)
Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.SelectAsync(HttpContext httpContext, CandidateSet candidateSet)
Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

For every MVC page:

InvalidOperationException: Setting the compiled descriptor on a compiled descriptor is not allowed.
Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor.set_CompiledPageDescriptor(CompiledPageActionDescriptor value)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.CompiledPageActionDescriptorFactory.CreateCompiledDescriptor(PageActionDescriptor actionDescriptor, CompiledViewDescriptor viewDescriptor)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageLoader.LoadAsyncCore(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageLoaderMatcherPolicy.ApplyAsyncAwaited(CandidateSet candidates, Task<CompiledPageActionDescriptor> actionDescriptorTask, int index)
Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pranavkmcommented, Aug 13, 2021
0reactions
malimingcommented, Aug 5, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

ASP.NET Core updates in .NET 6 Release Candidate 1
In .NET 6, you can now dynamically render Blazor components from JavaScript. ... matching the existing behavior when using IIS Express.
Read more >
What's New in ASP.NET Core in .NET 6
With ASP.NET Core, you can build dynamic server-rendered UIs using MVC or Razor Pages. You can integrate ASP.NET Core with popular JavaScript frameworks...
Read more >
Blazor CSS Isolation not working and not adding scope ...
NET 3.1 to .NET 5.0 and am trying to switch to using css isolation. I've created a scss file (which compiles to a...
Read more >
System.Web.Mvc v5.2.4.0 in UI for ASP.NET MVC
Hi! I'm getting all red squigglies on my CSHTML files but the site is still working without compile-time or runtime errors.
Read more >
How do you guys feel about Blazor : r/dotnet
I have a strong background building sites and web apps since aspx and I think blazor is a step back to a state...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found