Exception: Calendar with Uid=0 on opening Server 2016 Project (C# .NET)

I trying to open server project (2016 version), but getting error: "Cannot set calendar with Uid ‘0’ as a base calendar for calendar with Uid ‘0’ ". The calendar is not important to me, even if it is incorrect in the database. What am I doing wrong? Microsoft Interop work fine in this case.

            var connStr = new SqlConnectionStringBuilder
            {
                DataSource = "**server**",
                Authentication = SqlAuthenticationMethod.ActiveDirectoryIntegrated,
                Encrypt = true,
                TrustServerCertificate = true,
                InitialCatalog = "*db*",
                NetworkLibrary = "DBMSSOCN",
            };

            var settings = new MspDbSettings(connStr.ConnectionString, new Guid("**guid**"));                     

settings.Schema = “***”;
var prj = new Aspose.Tasks.Project(settings);

@vancho,

Can you please share complete working sample project along with source files so that we may further investigate to help you out.

Hmm… It is full piece of code for this step (pls, see first message)…

  1. Connect:
            var connStr = new SqlConnectionStringBuilder
            {
                DataSource = "**server**",
                Authentication = SqlAuthenticationMethod.ActiveDirectoryIntegrated,
                Encrypt = true,
                TrustServerCertificate = true,
                InitialCatalog = "*db*",
                NetworkLibrary = "DBMSSOCN",
            };

2. GUID of project:
var settings = new MspDbSettings(connStr.ConnectionString, new Guid("**guid**")); 

3. Scheme:
settings.Schema = “***”;

The connect will established. But:

4. ...error on project opening:
var prj = new Aspose.Tasks.Project(settings);

@vancho,

Thank you for sharing the information. However, in order to reproduce the issue, we need to have a working sample along with access to Project file that we may try to load on our end and help you further.

Hello @vancho .

Could you execute the following query on your MS Project database (db):

SELECT * FROM [*your 'settings.Schema' here*].MSP_PROJECT_CALENDARS

and share the result (in .csv format for example), please?

@vasiliysinitsyn,

Thank you for sharing the information. An issue with ID TASKSNET-3298 has been created in our issue tracking system to further investigate 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-3298) have been fixed in this update.