We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Resource Cost Does NOT persist to MS Project 2013

Hi,



When adding a Resource Cost to a Task and setting the “Cost”, the value assign to Cost does NOT get save to MS Project. Any work around?



See attached.



Thanks.

Cole



BTW, I’m using version 9.3 and MS Project 2013.

Hi Cole,

Thank you for writing to Aspose Support team.

Microsoft Project doesn’t allow to set Cost for a resource of Cost Type and the same behavior is implemented by Aspose.Tasks API as well. In order to do so, please set the cost for the resource assignment of the task. I have made some changes in your code that are highlighted in yellow. Please try these at your end and let us know your feedback.

Sample Code Changes:

Resource resCost = proj.Resources.Add(“ResourceCost”);

resCost.Set(Rsc.IsCostResource, true);

// Change Resource Type to ‘Cost’

//resCost.Set(Rsc.Cost, 33);

// does NOT get save to MS Project 2013.
ResourceAssignment assn1 = proj.ResourceAssignments.Add(eventTask, resCost);

assn1.Set(Asn.Cost, 33);

MPPSaveOptions mppSaveOptions = new MPPSaveOptions();

mppSaveOptions.WriteViewData = true;

Hi Kashif,

That did it! Thank you very much!

Cole

You are welcome.

Hi,



I’m expecting the Resource Cost of $100 displayed in brackets when viewed in Ghantt.

The attached code works with fresh install of MS Project 2013. But when Microsoft Updates are installed, it will no longer display the resource cost in brackets.



Any ideas? I’ve tried a number of combinations and currently using the version 16.11



See attached code.



Thanks,

Cole

this code will no longer work when Microsoft UPDATES are installed.

Any idea?

Hi Cole,

Thank you for contacting Aspose Support team.

We have investigated your shared sample code and were able to observe the issue specifically in Microsoft Project 2013. We have logged this issue for further analysis by our product team under Id: TASKSNET-1749. We’ll let you know once there is any further progress or a fix version available in this regard.

Uninstallig update KB3127978 works!!!

Hi Cole,


Thank you for the feedback. We have forwarded it to our product team.

@ColeR,

This issue has been fixed in latest version of Aspose.Tasks for .NET 17.9. Please let us know if we can be of any additional help to you with respect to your queries related to API.