Currently using Aspose.Tasks .Net Version 19.4 but this same problem happened in 17.1 as well.
I am trying to read the WBS from an MPP file as it appears in Project. I do not want to renumber the WBS.
Below is a simple example that reads the WBS. If I run this with a MPP file that was created using Project 2010 it works as expected. But if I run it with a MPP file that was created using Project 2016 the WBS is incorrectly renumbered. The sample files are identical except that the Project 2016 file was opened in Project 2010 and then resaved with a different name.
// Setup the szFilename variable to point to the mpp file.
prj2 = new Project(szFilename);
List tasks = (List)prj2.RootTask.SelectAllChildTasks();
for (int x = 0; x < tasks.Count; x++)
string szWBS = tasks[x].Get(Tsk.WBS);
// Print szWBS to output of your choice
Example files are attached.ExampleFiles.zip (99.1 KB)