Solution and Project Objects

The Solution object represents the currently loaded solution. The individual projects within the solution are available via Project objects returned within the Solution.Projects collection. Items within a project are accessed in a similar fashion through the Project.ProjectItems collection.

As you can see from Figure 13.1, this hierarchy exactly mirrors the solution/project hierarchy that we first discussed in Chapter 4, “Solutions and Projects.”

Figure 13.1 Mapping the solution/project hierarchy.

image

There are some mismatches here—solution folders, for instance, are treated as projects—but for the most part, the object ...

Get Microsoft® Visual Studio® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.