Get list of projects / links in Visual Studio 2010 Extension

I am creating a Visual Studio 2010 ( Microsoft.VisualStudio.Shell.Package) extension package that should parse all projects and these project links. I would suggest that this is done using a service (e.g. Package.GetService(typeof(IMenuCommandService))). I need an interface that contains functionality for getting a list of projects and links for these projects. In addition, it would be very useful to get tips on where to find the link containing the available interfaces in the visual studio.

Notice that I saw several people try to do something similar using the DTE from the macro. This is not what I'm trying to do. I am trying to do the same from a Visual Studio extension.

+5
source share
1 answer

So, although you are doing this as part of the extension, you still have to use the DTE APIs to get all the information you need. This may seem like the opposite, but this is how it works. You must capture the DTE object with (EnvDTE.DTE)Package.GetService(typeof(SDTE)). Once you have EnvDTE.Project , open its Object and click VSLangProj.VSProject if it is a C # or VB project. Here you need reference information.

+7
source

All Articles