I am working with Visual Studio 2010 and targeting MS Project 2013 and for some reason when I iterate through the Tasks collection, the ultimate root does not show up.
For reference, I am using the built in template: "Commercial Construction"
using Microsoft.Office.Interop.MSProject;
Project project;
project = Globals.ThisAddin.Application.ActiveProject;
foreach (Task t in project.Tasks)
{
// Do something with the task
}
All the tasks EXCEPT the ultimate root shows up. The main problem with this is:
1) How do I create an ultimate root task through VSTO?
Ok, I figured this out. The "ultimate root" is contained in a separate property:
Globals.ThisAddin.Application.ActiveProject.ProjectSummaryTask