ProjectServerManager Class

The class which provides the methods to read and to perform operations on projects in the specified Project Online account or in the specified on-premise Project Server instance (Project Server's versions 2016 and 2019 are supported).
Inheritance Hierarchy
SystemObject
  Aspose.TasksProjectServerManager

Namespace:  Aspose.Tasks
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
public sealed class ProjectServerManager

The ProjectServerManager type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleProjectServerManager
Initializes a new instance of the ProjectServerManager class.
Methods
  NameDescription
Public methodCode exampleCreateNewProject(Project)
Creates new project in Project Server\Project Online instance using default save options.
Public methodCode exampleCreateNewProject(Project, ProjectServerSaveOptions)
Creates new project in Project Server\Project Online instance using the specified save options.
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodCode exampleGetProject
Gets the project with the specified guid from the Project Online account \ Project Server instance.
Public methodCode exampleGetProjectList
Gets the list of projects from 'Working' store of the current Project Online account \ Project Server instance.
Public methodCode exampleGetProjectRawData
Gets the project's binary data for troubleshooting purposes.
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodCode exampleUpdateProject(Project)
Updates existing project in Project Server\Project Online instance using default save options. The existing project will be overwritten.
Public methodCode exampleUpdateProject(Project, ProjectServerSaveOptions)
Updates existing project in Project Server\Project Online instance using the specified save options. The existing project will be overwritten.
Events
  NameDescription
Public eventCode exampleExecutingWebRequest
An event that is raised when the web request is sent to Project Server's web API.
Examples
Shows how to use Project Server manager to create a new project with predefined save options on Microsoft Project Online.
try
{
    const string sharepointDomainAddress = "https://contoso.sharepoint.com/sites/pwa";
    const string UserName = "admin@contoso.onmicrosoft.com";
    const string Password = "MyPassword";

    var credentials = new ProjectServerCredentials(sharepointDomainAddress, UserName, Password);

    var project = new Project(DataDir + @"Project1.mpp");

    var manager = new ProjectServerManager(credentials);
    var options = new ProjectServerSaveOptions
    {
        Timeout = TimeSpan.FromSeconds(10)
    };
    manager.CreateNewProject(project, options);
}
catch (ProjectOnlineException ex)
{
    Console.WriteLine(ex.Message);
}
See Also