{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/4555","repository_url":"https://api.github.com/repos/aspnet/Mvc","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/4555/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/4555/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/4555/events","html_url":"https://github.com/aspnet/Mvc/issues/4555","id":151706090,"number":4555,"title":"Assemblies with a transitive dependency to  MVC are not included as part of the list of discovered assemblies","user":{"login":"javiercn","id":6995051,"avatar_url":"https://avatars.githubusercontent.com/u/6995051?v=3","gravatar_id":"","url":"https://api.github.com/users/javiercn","html_url":"https://github.com/javiercn","followers_url":"https://api.github.com/users/javiercn/followers","following_url":"https://api.github.com/users/javiercn/following{/other_user}","gists_url":"https://api.github.com/users/javiercn/gists{/gist_id}","starred_url":"https://api.github.com/users/javiercn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiercn/subscriptions","organizations_url":"https://api.github.com/users/javiercn/orgs","repos_url":"https://api.github.com/users/javiercn/repos","events_url":"https://api.github.com/users/javiercn/events{/privacy}","received_events_url":"https://api.github.com/users/javiercn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Mvc/labels/1%20-%20Ready","name":"1 - Ready","color":"CCCCCC"},{"url":"https://api.github.com/repos/aspnet/Mvc/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"javiercn","id":6995051,"avatar_url":"https://avatars.githubusercontent.com/u/6995051?v=3","gravatar_id":"","url":"https://api.github.com/users/javiercn","html_url":"https://github.com/javiercn","followers_url":"https://api.github.com/users/javiercn/followers","following_url":"https://api.github.com/users/javiercn/following{/other_user}","gists_url":"https://api.github.com/users/javiercn/gists{/gist_id}","starred_url":"https://api.github.com/users/javiercn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiercn/subscriptions","organizations_url":"https://api.github.com/users/javiercn/orgs","repos_url":"https://api.github.com/users/javiercn/repos","events_url":"https://api.github.com/users/javiercn/events{/privacy}","received_events_url":"https://api.github.com/users/javiercn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/Mvc/milestones/21","html_url":"https://github.com/aspnet/Mvc/milestones/1.0.0","labels_url":"https://api.github.com/repos/aspnet/Mvc/milestones/21/labels","id":1641505,"number":21,"title":"1.0.0","description":null,"creator":{"login":"Eilon","id":202643,"avatar_url":"https://avatars.githubusercontent.com/u/202643?v=3","gravatar_id":"","url":"https://api.github.com/users/Eilon","html_url":"https://github.com/Eilon","followers_url":"https://api.github.com/users/Eilon/followers","following_url":"https://api.github.com/users/Eilon/following{/other_user}","gists_url":"https://api.github.com/users/Eilon/gists{/gist_id}","starred_url":"https://api.github.com/users/Eilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eilon/subscriptions","organizations_url":"https://api.github.com/users/Eilon/orgs","repos_url":"https://api.github.com/users/Eilon/repos","events_url":"https://api.github.com/users/Eilon/events{/privacy}","received_events_url":"https://api.github.com/users/Eilon/received_events","type":"User","site_admin":false},"open_issues":66,"closed_issues":24,"state":"open","created_at":"2016-03-13T21:27:04Z","updated_at":"2016-05-03T19:30:31Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-04-28T18:02:27Z","updated_at":"2016-05-04T16:01:21Z","closed_at":null,"body":"When an application in Assembly A references an Assembly B which in turn references an Assembly C that contains a reference to MVC, we won't include B as part of the list of discovered assemblies. For example:\r\n\r\nMusicStore.dll references MusicStore.Data which references MusicStore.Models which in turn references Mvc, but MusicStore.Data doesn't get included in the list of discovered assemblies.\r\n\r\nThe issue is that RuntimeLibrary.Dependencies only lists direct dependencies and the filtering method that we have only looks on the list of dependencies for a reference to any of the reference MVC assemblies.\r\n\r\n```C#\r\nprivate static bool IsCandidateLibrary(RuntimeLibrary library)\r\n{\r\n    Debug.Assert(ReferenceAssemblies != null);\r\n    return !ReferenceAssemblies.Contains(library.Name) &&\r\n        library.Dependencies.Any(dependency => ReferenceAssemblies.Contains(dependency.Name));\r\n}\r\n```\r\n\r\nproject.json for MusicStore.Models\r\n```\r\n{\r\n  \"version\": \"1.0.0\",\r\n  \"dependencies\": {\r\n    \"Microsoft.AspNetCore.Identity.EntityFrameworkCore\": \"1.0.0-*\",\r\n    \"Microsoft.AspNetCore.Mvc.ViewFeatures\": \"1.0.0-*\",\r\n    \"Microsoft.EntityFrameworkCore\": \"1.0.0-*\",\r\n    \"Microsoft.Extensions.Configuration.CommandLine\": \"1.0.0-*\",\r\n    \"Microsoft.Extensions.Configuration.EnvironmentVariables\": \"1.0.0-*\",\r\n    \"Microsoft.Extensions.Configuration.Json\": \"1.0.0-*\",\r\n    \"NETStandard.Library\": \"1.5.0-rc2-24018\"\r\n}\r\n```\r\n\r\nDebug session ilustrating the failing condition\r\n\r\n![image](https://cloud.githubusercontent.com/assets/6995051/14896157/393aaf34-0d31-11e6-8a32-9f0b195fb607.png)\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/216912349","html_url":"https://github.com/aspnet/Mvc/issues/4555#issuecomment-216912349","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/4555","id":216912349,"user":{"login":"rynowak","id":1430011,"avatar_url":"https://avatars.githubusercontent.com/u/1430011?v=3","gravatar_id":"","url":"https://api.github.com/users/rynowak","html_url":"https://github.com/rynowak","followers_url":"https://api.github.com/users/rynowak/followers","following_url":"https://api.github.com/users/rynowak/following{/other_user}","gists_url":"https://api.github.com/users/rynowak/gists{/gist_id}","starred_url":"https://api.github.com/users/rynowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynowak/subscriptions","organizations_url":"https://api.github.com/users/rynowak/orgs","repos_url":"https://api.github.com/users/rynowak/repos","events_url":"https://api.github.com/users/rynowak/events{/privacy}","received_events_url":"https://api.github.com/users/rynowak/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T16:01:21Z","updated_at":"2016-05-04T16:01:21Z","body":"> And need to discuss with @rynowak to see if there were any especially compelling reasons why we didn't always do this.\r\n\r\nThis is a bug. Transitive references were always supposed to be considered"}}