{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/1721","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/1721/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/1721/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/1721/events","html_url":"https://github.com/dotnet/roslyn/issues/1721","id":65603327,"number":1721,"title":"CodeLens reference count ignores InternalsVisibleTo","user":{"login":"jskeet","id":17011,"avatar_url":"https://avatars.githubusercontent.com/u/17011?v=3","gravatar_id":"","url":"https://api.github.com/users/jskeet","html_url":"https://github.com/jskeet","followers_url":"https://api.github.com/users/jskeet/followers","following_url":"https://api.github.com/users/jskeet/following{/other_user}","gists_url":"https://api.github.com/users/jskeet/gists{/gist_id}","starred_url":"https://api.github.com/users/jskeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskeet/subscriptions","organizations_url":"https://api.github.com/users/jskeet/orgs","repos_url":"https://api.github.com/users/jskeet/repos","events_url":"https://api.github.com/users/jskeet/events{/privacy}","received_events_url":"https://api.github.com/users/jskeet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-01T04:38:39Z","updated_at":"2015-04-01T04:38:39Z","closed_at":null,"body":"Environment: VS2015 CTP6, Windows 8.1, x64.\r\n\r\nIf a member in assembly A1 is only visible to assembly A2 due to `[assembly:IntervalsVisibleTo(\"A2\")]` then the CodeLens reference count won't include references from A2 to members of A1.\r\n\r\nSample code (would attach a zip file, but it's not supported):\r\n\r\nLibrary assembly (a class library)\r\n\r\n```csharp\r\n[assembly:InternalsVisibleTo(\"Client\")]\r\nnamespace Library\r\n{\r\n    internal class Sample\r\n    {\r\n        internal static void FindMe() {}\r\n    }\r\n}\r\n```\r\n\r\nClient assembly (a console app)\r\n\r\n```csharp\r\nusing Library;\r\n\r\nnamespace Client\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            Sample.FindMe();\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nIt builds fine, and VS definitely knows what `FindMe` refers to - F12 goes to the right place - but while either `Sample` or `FindMe` is internal, CodeLens shows 0 references. Change them both to be public, and CodeLens shows 1 reference."}}