CreateNewProject

ProjectServerManager.CreateNewProject method (1 of 2)

Creates new project in Project Server\Project Online instance using default save options.

public void CreateNewProject(Project project)
Parameter Type Description
project Project The project to save to Project Server\Project Online instance.

Exceptions

exception condition
ProjectOnlineException In case of communication error or error returned by a server.

Examples

In this example the project is loaded from .mpp file and saved to Project Online account.

[C#]
var credentials = new ProjectServerCredentials("https://xxxxxx.sharepoint.com", "yyyyy@xxxxxxx.onmicrosoft.com", "password");
var project = new Project(@"sample.mpp");
ProjectServerManager manager = new ProjectServerManager(credentials);
manager.CreateNewProject(project);

See Also


ProjectServerManager.CreateNewProject method (2 of 2)

Creates new project in Project Server\Project Online instance using the specified save options.

public void CreateNewProject(Project project, ProjectServerSaveOptions saveOptions)
Parameter Type Description
project Project The project to save to Project Server\Project Online instance.
saveOptions ProjectServerSaveOptions Instance of ProjectServerSaveOptions class.

Exceptions

exception condition
ProjectOnlineException In case of communication error or error returned by a server.

Examples

In this example the project is loaded from .mpp file and saved to Project Online account.

[C#]
var credentials = new ProjectServerCredentials("https://xxxxxx.sharepoint.com", "yyyyy@xxxxxxx.onmicrosoft.com", "password");
var project = new Project(@"sample.mpp");
ProjectServerManager manager = new ProjectServerManager(credentials);
manager.CreateNewProject(project, new ProjectServerSaveOptions
{
    ProjectName = "My new project"
});

See Also