MS Project xml file generated using Aspose.Tasks isn't showing correct completion % as in xml

I am exporting project in ms project xml file using Aspose.Tasks.

When I see the xml generated, it has all correct completion percentages for each task, but when I import that xml in MS project, it changes completion to 100% complete even though its 0% complete in xml. I have attached xml file exported.

Hi Vinayak,


Thank you for using Aspose.Tasks.

Could you please share your sample code for creating the sample XML file. We need to reproduce this issue at our end for further investigation and will assist you further as soon as possible.

Hi

I have attached my sample code here. Please let me know what am I doing wrong.

Thanks
Vinayak

Hi Vinayak,


Thnaks for the feedback.

There are couple of things that I would like to mention here.

1. We are afraid to share that the sample code you have provided is not in runnable form which makes it difficult for us to investigate the issue further.

2. The XML file you have shared earlier is created with quite an old version of Aspose.Tasks i.e. Aaspose.Tasks for .NET 4.9.0. We had one such problem reported in our lateral versions which was then fixed as well. Could you please run the code at your end with Aspose.Tasks for .NET 5.9.0 and share your feedback here for our further investigation?

Also, I would request you to please provide us a sample runnable code that could be used to reproduce the issue. We’ll look into it as soon as possible and assist you further.

Hi Kashif,


I did try using v5.9 but not much changed. I have attached new xml file generated using v5.9.

How can I give you executable code. I am accessing data from db and different objects. the code provided in previous post is functionality that is generating project used by ProjectWriter

However could you please tell me what is missing from the xml file or if you could provide some sample code that generates project xml with some tasks, resource assignments, constraints, etc. The code sample given on your examples section is very basic. I have used same code with modifications as I understood from your documentation.

Regards,
Vinayak

Hi,


Did you had a chance to look at my query yet?

Regards,
Vinayak

Hi Vinayak,


Please accept our apology for the delayed response.

We are analyzing the issue and discussing it with the development team. I would like to request you to spare us little time to conclude the discussion and I will share the findings soon by writing here on the forum.

Thanks in advance for your patience and understanding in this regard.

Hi Vinayak,


We have analyzed the requirement and a sample code is attached here for your reference. It creates XML file which contains Percentage complete similar to the one while opened in MSP. Task.SetPercentComplete() is used for setting the PercentComplete of each sub-task after recalculation and updation of project references. A template project is also used to initialize the instance of Project in the sample code.

MSP recalculates the project automatically whenever it opens an XML. If there are any discrepancies in the project, those are removed and updated XML is displayed in MSP. Aspose.Tasks is in continuous process of improvement to produce results closer to MSP as much as possible. Our new incoming release will introduce new features to add tasks, resources and indentation of tasks. This current issue will be more properly addressed in the new release where AddTask, AddRsc, AddAssn will be provided which automatically set references, Ids, Uids and default properties.

Please feel free to write us back if you have any other query in this regard.