I'm using the .NET assembly version 4.2.0.0.to process an XML created by MS Project 2007.
The folllwing code throws an exception for me:
// Locate the existing task and Resource
net.sf.mpxj.Task task = _project.getTaskByUniqueID(java.lang.Integer.valueOf(intTaskUID));
net.sf.mpxj.Resource resource = _project.getResourceByUniqueID(java.lang.Integer.valueOf(intResourceUID));
// Create a new resource assignment
net.sf.mpxj.ResourceAssignment resourceAssignment = task.addResourceAssignment(resource);
java.lang.Integer taskUID = resourceAssignment.getTaskUniqueID();
Assert.assertNotNull(taskUID);
I have verified that the task and the resource each have valid UniqueID values.
I can work around this, by getting the UniqueID from the task and setting it on the resourceAssignment.
Additional Info:
Both the Task and the Resource we created during the execution of my program.
I've added a change which should fix this. I'll check it in to CVS tonight.
Jon
The code to fix this is now in CVS.