{"action":"created","issue":{"url":"https://api.github.com/repos/retailcoder/Rubberduck/issues/280","labels_url":"https://api.github.com/repos/retailcoder/Rubberduck/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/retailcoder/Rubberduck/issues/280/comments","events_url":"https://api.github.com/repos/retailcoder/Rubberduck/issues/280/events","html_url":"https://github.com/retailcoder/Rubberduck/issues/280","id":59858251,"number":280,"title":"Having two identically named Projects open blows up Navigation","user":{"login":"ckuhn203","id":2716800,"avatar_url":"https://avatars.githubusercontent.com/u/2716800?v=3","gravatar_id":"","url":"https://api.github.com/users/ckuhn203","html_url":"https://github.com/ckuhn203","followers_url":"https://api.github.com/users/ckuhn203/followers","following_url":"https://api.github.com/users/ckuhn203/following{/other_user}","gists_url":"https://api.github.com/users/ckuhn203/gists{/gist_id}","starred_url":"https://api.github.com/users/ckuhn203/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckuhn203/subscriptions","organizations_url":"https://api.github.com/users/ckuhn203/orgs","repos_url":"https://api.github.com/users/ckuhn203/repos","events_url":"https://api.github.com/users/ckuhn203/events{/privacy}","received_events_url":"https://api.github.com/users/ckuhn203/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/retailcoder/Rubberduck/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/retailcoder/Rubberduck/labels/todo-explorer","name":"todo-explorer","color":"DDDDDd"},{"url":"https://api.github.com/repos/retailcoder/Rubberduck/labels/unit-testing","name":"unit-testing","color":"DDDDDd"},{"url":"https://api.github.com/repos/retailcoder/Rubberduck/labels/user-interface","name":"user-interface","color":"DDDDDd"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/retailcoder/Rubberduck/milestones/18","html_url":"https://github.com/retailcoder/Rubberduck/milestones/Version%201.21","labels_url":"https://api.github.com/repos/retailcoder/Rubberduck/milestones/18/labels","id":996826,"number":18,"title":"Version 1.21","description":"This release will focus on improving performance and general user experience, as well as expanding our test coverage and fixing any bugs found in the v1.2 release.","creator":{"login":"ckuhn203","id":2716800,"avatar_url":"https://avatars.githubusercontent.com/u/2716800?v=3","gravatar_id":"","url":"https://api.github.com/users/ckuhn203","html_url":"https://github.com/ckuhn203","followers_url":"https://api.github.com/users/ckuhn203/followers","following_url":"https://api.github.com/users/ckuhn203/following{/other_user}","gists_url":"https://api.github.com/users/ckuhn203/gists{/gist_id}","starred_url":"https://api.github.com/users/ckuhn203/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckuhn203/subscriptions","organizations_url":"https://api.github.com/users/ckuhn203/orgs","repos_url":"https://api.github.com/users/ckuhn203/repos","events_url":"https://api.github.com/users/ckuhn203/events{/privacy}","received_events_url":"https://api.github.com/users/ckuhn203/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":4,"state":"open","created_at":"2015-02-26T11:39:32Z","updated_at":"2015-03-05T02:00:24Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-03-04T20:39:32Z","updated_at":"2015-03-05T02:10:31Z","closed_at":null,"body":"# Stack Trace:\r\n\r\n\tSystem.InvalidOperationException: Sequence contains no matching element\r\n\t   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)\r\n\t   at Rubberduck.UI.UnitTesting.TestExplorerDockablePresenter.OnExplorerGoToSelectedTest(Object sender, SelectedTestEventArgs e) in c:\\Users\\Christopher\\Source\\Repos\\Rubberduck\\RetailCoder.VBE\\UI\\UnitTesting\\TestExplorerDockablePresenter.cs:line 121\r\n\t   at Rubberduck.UI.UnitTesting.TestExplorerWindow.GridCellDoubleClicked(Object sender, DataGridViewCellEventArgs e) in c:\\Users\\Christopher\\Source\\Repos\\Rubberduck\\RetailCoder.VBE\\UI\\UnitTesting\\TestExplorerWindow.cs:line 228\r\n\t   at System.Windows.Forms.DataGridViewCellEventHandler.Invoke(Object sender, DataGridViewCellEventArgs e)\r\n\t   at System.Windows.Forms.DataGridView.OnCellDoubleClick(DataGridViewCellEventArgs e)\r\n\t   at System.Windows.Forms.DataGridView.OnDoubleClick(EventArgs e)\r\n\t   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n\t   at System.Windows.Forms.Control.WndProc(Message& m)\r\n\t   at System.Windows.Forms.DataGridView.WndProc(Message& m)\r\n\t   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n\t   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n\t   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n\r\n# [Relevant code:](https://github.com/retailcoder/Rubberduck/blob/master/RetailCoder.VBE/UI/UnitTesting/TestExplorerDockablePresenter.cs#L121-L125)\r\n\r\n            var codeModule = this.VBE.VBProjects.Cast<VBProject>()\r\n                     .First(project => project.Name == controlSelection.ProjectName)\r\n                     .VBComponents.Cast<VBComponent>()\r\n                     .First(component => component.Name == controlSelection.ModuleName)\r\n                     .CodeModule;\r\n\r\n# Repro:\r\n\r\n1. Create a new workbook.\r\n2. Create a second new workbook\r\n3. Add a test module and test method\r\n4. Double click record in gridview\r\n5. *Boom*\r\n\r\n# Note:\r\n\r\nThe Todo Explorer is exhibiting similar behavior, but seems to be swallowing the exception some how. May or may not be related. "},"comment":{"url":"https://api.github.com/repos/retailcoder/Rubberduck/issues/comments/77292909","html_url":"https://github.com/retailcoder/Rubberduck/issues/280#issuecomment-77292909","issue_url":"https://api.github.com/repos/retailcoder/Rubberduck/issues/280","id":77292909,"user":{"login":"ckuhn203","id":2716800,"avatar_url":"https://avatars.githubusercontent.com/u/2716800?v=3","gravatar_id":"","url":"https://api.github.com/users/ckuhn203","html_url":"https://github.com/ckuhn203","followers_url":"https://api.github.com/users/ckuhn203/followers","following_url":"https://api.github.com/users/ckuhn203/following{/other_user}","gists_url":"https://api.github.com/users/ckuhn203/gists{/gist_id}","starred_url":"https://api.github.com/users/ckuhn203/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckuhn203/subscriptions","organizations_url":"https://api.github.com/users/ckuhn203/orgs","repos_url":"https://api.github.com/users/ckuhn203/repos","events_url":"https://api.github.com/users/ckuhn203/events{/privacy}","received_events_url":"https://api.github.com/users/ckuhn203/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T02:10:31Z","updated_at":"2015-03-05T02:10:31Z","body":"It makes sense now. Consider this code. \r\n\r\n            var codeModule = this.VBE.VBProjects.Cast<VBProject>()\r\n                     .First(project => project.Name == controlSelection.ProjectName)\r\n                     .VBComponents.Cast<VBComponent>()\r\n                     .First(component => component.Name == controlSelection.ModuleName)\r\n                     .CodeModule;\r\n\r\nIf there are two identically named projects, but only **one of them** has the module name that is being searched for, the invalid operation exception is thrown. The component really doesn't exist (in that project).\r\n"}}