When writing resources to mpp, the GUID that is being setted using the aspose library is not the GUID that is shown when I open the mpp file. This is only happening with resources, tasks GUIDs are correct.
This is my code:
//start project from empty mpp template
Project mppProject = new Project("C:/mpp-test/project-plan-template-empty.mpp");
//add one resource
Resource mppResource = mppProject.getResources().add();
mppResource.set(Rsc.UID, 1);
mppResource.set(Rsc.GUID, "FF36DDFB-7955-4C1A-B177-EF3B6921F821");
mppResource.set(Rsc.NAME, "Test Resource");
mppResource.set(Rsc.TYPE, ResourceType.Work);
//add one task
com.aspose.tasks.Task mppTask = mppProject.getRootTask().getChildren().add();
mppTask.set(Tsk.UID, 1);
mppTask.set(Tsk.GUID, "3DE4DE9A-F1EC-45A4-B478-6BD11A97532B");
mppTask.set(Tsk.WBS, "WP-1");
mppTask.set(Tsk.NAME, "Test Task");
//export to mpp
mppProject.save("C:/mpp-test/project-export.mpp", SaveFileFormat.MPP);
When I open the mpp file, the task GUID is the one that I saved, but the resource GUID is always different.