I have another file created with Aspose.Project that I am sending to email@example.com. Among the tasks are one task with ID=15, Name=Other New Task, UniqueID=104183, and another task with ID=31, Name=Sub, UniqueID=104179. These two tasks are opening and saving with incorrect values of UniqueID in MS 2002. In MS 2003 only the second one seems to come up incorrect. The MPX file appears to be correct, but MS is opening it with incorrect values. The UniqueID needs to be correct, as it is the primary key in a database.
Can you suggest anything I can do to the MPX file to prevent this misreading of UniqueID values?
This problem can be solved by renumbering IDs to delete empty tasks (6, 9, 12, 14 and etc.).
MS Project has very bad algorithm for generating Unique ID numbers.
Your project doesn’t contain task with ID=12. MS Projects inserts it automatically and assigns new UniqueID=104179.
So later this number can’t be assigned for task with ID=31.