Is Aspose.Tasks 22.4 backward compatible with 19.1

Hi,
We have worked around the previous issues we had upgrading from 19.1 to 22.4. However, now we are running into a question of backwards compatibility. We create a new project using aspose 22.4 and save the project file using Project 2021. When we then try to export again using aspose 19.1, we get a program crash as follows:

Project reading exception. at . (Project , Stream )
at .(Stream )
at Aspose.Tasks.Project.(Stream , ParseErrorCallback , PrimaveraXmlReadingOptions )
at Aspose.Tasks.Project.(Stream , ParseErrorCallback )
at Aspose.Tasks.Project…ctor(Stream stream, ParseErrorCallback parseErrorHandler)
at Aspose.Tasks.Project…ctor(Stream stream)
at Pathix.MSProject.MSProjectEditor.exportToMSProject(DataTable _MSProjectData, Int32 _order, Int32 _tsk) in C:\Devel_W\Pathix.BLC\Pathix.BLC.MSProject\MSProjectEditor.cs:line 342System.ArgumentException: An entry with the same key already exists.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value)
at .()
at …ctor(Stream , Stream , Stream , Stream , Int32 , Int32 , Int32 , Int32 , )
at …ctor(Stream , Stream , Stream , Stream , Int32 , Int32 , Int32 , Int32 )
at . ()
at . ()
at . ()
at . (Project , Stream )" on MSProjectEditor

This doesn’t happen if we try an export using the same version as the file was initially created with.

Is aspose 22.3 projects compatible with aspose 19.1 projects?

Any help is appreciated.
Thanks

@liesa.collier,

Is aspose 22.3 projects compatible with aspose 19.3 projects?

Generally speaking files saved using 22.3 should be opened by 19.3 version if that’s what you mean.

In order to reproduce the issue we need a working sample code and sample input file.

I made a typo in the previous post, the current version we are at is 19.1 and trying to upgrade to 22.4.

Here is a sample input file. This project was created using aspose 22.4. It was opened in Microsoft project 2021 and saved.

823_984___CHKTEST.zip (50.0 KB)

In 19.1, when it tries to create the new project object using the following code, it crashes

using (FileStream destinationStream = File.Open(_destination, FileMode.Open, FileAccess.ReadWrite, FileShare.Read))
{
_myMSProject = new Project(destinationStream);
}

@liesa.collier,

the point is in backward (in)compatibility of v. 19.1 and MPPs saved by ‘latest’ updates/versions of MS Project. Some updates of MS Project introduce changes of internal format of MPP files and version 19.1 was not able to handle these MPP files correctly.
For example, version 19.1 reads file saved by MS Project 16.0.4229.1009, but throws error when trying to read MPP files saved by MS Project 16.0.14332.20281.

Version 22.4 should read these files correctly.

As for backward compatibility, if you save MPP files produced by ''old" versions of MS Project using 22.4, it should be read correctly by v. 19.1.