[AspNetCore 3.0] 'IRoutingFeature' cannot be extracted from context features
See original GitHub issueDescribe the bug
IRoutingFeature
cannot be extracted from context features, leading to GetNameFromRouteContext(RouteData)
not work (/user/profile/1
cannot be replaced by /user/profile/{id}
)
To Reproduce Steps to reproduce the behavior:
- Create AspNet Core 3.0 project from template
- Add Elastic.Apm.AspNetCore package reference
- Add
app.UseElasticApm(Configuration);
in Startup.cs - You’ll see transaction name won’t be replaced by
RouteData
Expected behavior Transaction name should be replaced by route data
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Breaking changes in .NET Core 3.0
Lists the breaking changes in version 3.0 of .NET Core, ASP.NET Core, and EF Core.
Read more >IRoutingFeature Interface (Microsoft.AspNetCore.Routing)
A feature interface for routing functionality.
Read more >ASP.NET Core Anatomy (Part 4) - Invoking the MVC Middleware
Dissecting what happens when Invoking the MVC middleware in an ASP.NET Core pipeline via the RouterMiddleware.
Read more >'Could not load type 'Microsoft.AspNetCore.Mvc. ...
The reason why you're getting the error is because MvcJsonOptions was removed in .NET Core 3.0; you can read more about the breaking...
Read more >Accessing route values in endpoint middleware in ASP. ...
In this post I describe how you can access the route values from middleware when using endpoint routing in ASP.NET Core 3.0.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@gregkalapos, I believe it can be closed due to #647 was merged
Looks like there’re some ways to resolve this:
2.1.0
to2.2.0
- I’ve made a PR explorering this;TargetFrameworks
to target bothnetstandard2.0
andnetcoreapp3.0
and have different dependencies, conditional code blocks to make this function works in AspNetCore 3.0netcoreapp2.1
’s deprecation - then the first action might become necessary