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

EnvDTE.Project.ProjectItems is null?

$
0
0

Hi there, I am using vs 2013 to write a visual studio extension.

I have a list of projects in my extension that I am loading as follows:

DTE dte = this.GetService(typeof(DTE)) as DTE;
            if (dte != null)
            {
                EnvDTE.Solution sol = dte.Solution;
                SolutionDir = System.IO.Path.GetDirectoryName(sol.FullName);
                Projects = new ObservableCollection<ProjectInstallation>();
                foreach (EnvDTE.Project project in ((DTE)dte).Solution.Projects)
                {
                    Projects.Add(new ProjectInstallation() { Project = project });
                }
            }

This appeared to be working, however now when I look at my list of projects, each of which is a ProjectInstallation object which contains an EnvDte object - the ENVDte.Project object contains no project items.

I also get a not implemented error when I try to look at the project FullName for example

Where am I going wrong?


Viewing all articles
Browse latest Browse all 4410

Trending Articles



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