Cannot resolve action in ASP.NET Core controller when calling Url.Action()


1. Create an empty ASP.NET Core Web API project (.NET Core v2, v3, v5 — doesn't matter, reproduces everywhere).
2. Go to the controller and add the following line of code to the Get action:

string selfLink = Url.Action();

"Cannot resolve action 'Get'" error is shown for no reason.

The code works as expected, a proper URL pointing to the current action is generated.

Looks similar to but it is stated as "fixed" a while ago.

Comment actions Permalink

Hello Vladimir,

Thank you for reporting the issue, I have created a corresponding record on our bug tracker: RSRP-484897. Please upvote it and click on Watch to monitor the progress of the issue.

Have a good day!


Please sign in to leave a comment.