I created a new extensibility package VS 2010. For now, all I want to do is click the user button and fill out the list with all the contents of the solution. I have the following code:
EnvDTE80.DTE2 dte = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.
GetActiveObject("VisualStudio.DTE.10.0");
foreach (Project project in dte.Solution.Projects)
{
foreach(ProjectItem pi in project.ProjectItems)
{
listView1.Items.Add(pi.Name.ToString());
}
}
This seems to work, but it populates the list with the contents of the solution with the package, and not with the experimental instance that starts when it starts. Am I creating the link incorrectly?
source
share