When looping through one one of the files, the first For-Loop grabs all tasks of the master project AND all the tasks of each subproject. When looping through the other file, the first For-Loop only grabs the tasks of the master project, and I need to loop through the tasks of the subprojects seperately using the second set of nested for-loops.
Does anyone know why this would happen?
I can handle either case individually, but don't know beforehand which will happen. I cannot be sure that the master project only contains subprojects and no 'live' tasks of its own. So, I have to loop through the master project's tasks, and I don't want to read the subproject tasks a second time by looping through each subproject if I don't need to.