Free Support Forum -

Exception: An element with the same key already exists on creating new Project (C# .NET)


We have Aspose Tasks Java 18.7.

We are having a problem with creating new Project. When we creating it we are getting the following exception:

Caused by: class com.aspose.tasks.private.Exceptions.ArgumentException: An element with the same key already exists_
com.aspose.tasks.private.Collections.Generic.SortedList$ThrowHelper.a(Unknown Source)_
com.aspose.tasks.private.Collections.Generic.SortedList.b(Unknown Source)_

This is a sample code and an MPP project file which causing problems: (26.1 KB)

	public static void main(String[] args) throws FileNotFoundException {

	File file = new File("project1.mpp");
	FileInputStream fileInputStream = new FileInputStream(file);

	Project project = new Project(fileInputStream);

We also tried to run this code in Aspose Tasks 19.7 but still getting the same exception :frowning:

Do You know what is the cause of this behaviour?


I have observed the issue shared by you and and issue with ID TASKSNET-3467 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as TASKSNET-3467) have been fixed in this update.

Thank you for releasing the fix, however, I can see that it was released only for .Net. When will this fix be available for Java (which we are using)?


This issue will be resolved in Aspose.Tasks for Java 19.9 as well. If there is still an issue than inform us here.

Hi @Adnan.Ahmad,
Thank you for your reply. Can you share any ETA for the Java version? This unfortunately directly affects some of our Clients and we’d really like to let them know when the fix is supposed to be released.

Thanks in advance!


We regret to share that at present the concerned Java release for Aspose.Tasks 19.9 is not available. We request for your patience till the time the product will be shared online and we request for your patience in this regard.


Do you have any workarounds for making such MPP projects work properly?
Alternatively, do you have any information what exactly is the problem in MPP files?

We tried to fix it in hotfix 19.9 but the simple fix of exception gave another issue which was really hard to fix.
We will try to fix it in the next hotfix release.

Do you have any information when the next hotfix (with fix for this bug) will be released?

This fix is crucial to us.


Can you please try using latest Aspose.Tasks for .NET 19.10 on your end. In case there is an issue please feel free to share with us.

As we mentioned earlier we use JAVA version of Aspose.Tasks.


I suggest you to please try using Aspose.Tasks for Java 19.9 in that case on your end.

We’ve tried to use Aspose.Tasks 19.9 but in this version the bug still occurs.

This fix is very important to us.


I have worked with latest version Aspose.Tasks for .NET 19.10 and unable to observe any issue. We will be having corresponding Aspose.Tasks for Java 19.10 by the end of October in which issue is likely to be fixed.

Hi, Do you guys have any information when the hotfix mentioned earlier will be released or maybe have you released it yet?


I like to share that Aspose.Tasks for .NET 19.10 is available online. However, the corresponding Aspose.Tasks for Java 19.10 has still not been rolled out. We request for your patience and will share the good news with you as soon as possible.

Hi, could you explain what was the root cause of this issue? In our case some of *.mpp files were working fine and other were causing this particular error?



I have observed your comments and like to share that the issue has been fixed for shared MPP files. I may not be able to provide the internal details of the issue. However, if you still facing issue with other MPP files, please share them with us and we will investigate them as well.

Not able to create a new programme importing .mpp file. Is this relevant?

CSL plan import error 19-Feb-2020.jpg (65.0 KB)