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.

[AspNetCore 3.0] 'IRoutingFeature' cannot be extracted from context features

See original GitHub issue

Describe 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:

  1. Create AspNet Core 3.0 project from template
  2. Add Elastic.Apm.AspNetCore package reference
  3. Add app.UseElasticApm(Configuration); in Startup.cs
  4. You’ll see transaction name won’t be replaced by RouteData

Expected behavior Transaction name should be replaced by route data

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vhatsuracommented, Dec 20, 2019

@gregkalapos, I believe it can be closed due to #647 was merged

1reaction
yhviceycommented, Nov 28, 2019

Looks like there’re some ways to resolve this:

  1. Upgrade dependencies’ version from 2.1.0 to 2.2.0 - I’ve made a PR explorering this;
  2. Use TargetFrameworks to target both netstandard2.0 and netcoreapp3.0 and have different dependencies, conditional code blocks to make this function works in AspNetCore 3.0
  3. Wait for netcoreapp2.1’s deprecation - then the first action might become necessary
Read more comments on GitHub >

github_iconTop 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 >

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