Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How to use an EnvDTE.DTE instance from a Visual Studio package

$
0
0

I am able to set up and get the instance of the EnvDTE environment by using the code supplied here:

http://www.visualstudioextensibility.com/articles/packages/

Problem becomes how do I use it.   I want to be able to for example to get the project name that I am currently under by scrolling through solution explorer.  I also want to be able to get a list of selected files under the project. Basically I want to duplicate this behavior from a 2008 VS Addin.

SelectedItems sis = _applicationObject.SelectedItems;

Project projSelected = (Project)((Object[])_applicationObject.ActiveSolutionProjects)[0];

string sCatalogName = projSelected.Name;

Solution sln = _applicationObject.Solution;

I need to be able to duplicate this is my package, is this possible?


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>