{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/3601","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/3601/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/3601/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/3601/events","html_url":"https://github.com/aspnet/Mvc/issues/3601","id":118160562,"number":3601,"title":"a TagHelper generates url for controller in another project","user":{"login":"phenombox","id":6577077,"avatar_url":"https://avatars.githubusercontent.com/u/6577077?v=3","gravatar_id":"","url":"https://api.github.com/users/phenombox","html_url":"https://github.com/phenombox","followers_url":"https://api.github.com/users/phenombox/followers","following_url":"https://api.github.com/users/phenombox/following{/other_user}","gists_url":"https://api.github.com/users/phenombox/gists{/gist_id}","starred_url":"https://api.github.com/users/phenombox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phenombox/subscriptions","organizations_url":"https://api.github.com/users/phenombox/orgs","repos_url":"https://api.github.com/users/phenombox/repos","events_url":"https://api.github.com/users/phenombox/events{/privacy}","received_events_url":"https://api.github.com/users/phenombox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-21T01:38:43Z","updated_at":"2015-11-21T01:38:43Z","closed_at":null,"body":"I have a VS2015 solution that includes a WebApi and a WebSite.\r\n\r\nAll packages are rc1 in both solutions.\r\n\r\nSince my project is in early development I'm referencing the WebApi project direclty from the WebSite project in order to get the Model classes/objects to deserialize responses from the WebApi. This will be changed to use of DTOs later.\r\n\r\nThere is a UsersController.cs in both projects.\r\n\r\nThe issue is that when using TagHelper <a> to generate url for the users controller in the website:\r\n`<a asp-controller=\"Users\" asp-action=\"Index\">Users</a>`\r\nis not generating localhost/Users (WebSite Controller), but localhost/api/Users (WebApi) controller instead.\r\n\r\nThis results in a (misleading) exception: \r\n`InvalidOperationException: Unable to resolve service for type 'Px.Dealership.WebApi.Models.DealershipContext' while attempting to activate 'Px.Dealership.WebApi.Controllers.UsersController'.`\r\n\r\n\r\nIt's probably since I'm referencing the webapi project direclty and both projects have a UsersController, this will of course be changed later on.\r\n\r\nNot sure if it's a bug, but shouldn't the tag helper prioritize controllers in its own project first?\r\n\r\n\r\n\r\n\r\n"}}