How do I subscribe to solution and project events from a VSPackage
问题 I'm developing a language service for Visual Studio through a VSPackage. I need to update my parse data whenever files get added/removed from the solution's projects. I want to subscribe to solution and project events. I tried as follows, but none of these events get fired when I add/remove projects to the solution or add/remove items to projects. DTE dte = (DTE)languageService.GetService(typeof(DTE)); if (dte == null) return; ((Events2)dte.Events).SolutionEvents.ProjectAdded +=