DEV Community

panchenko-dm-aspose
panchenko-dm-aspose

Posted on • Edited on

Save your projects in C# to Project Server\Project Online via PWA using Aspose.Tasks for .NET

Introduction

Below guide explains how you can manipulate your projects from MS Project Online (Project Web Application) hosted by SharePoint.

Background

The new Aspose.Tasks feature uses Project Web Access (or PWA) API - the same API is used for interaction of Microsoft Project Professional desktop application and Project Online service.

Using the code

Aspose.Tasks for .NET can be added as a NuGet reference from https://www.nuget.org/packages/Aspose.Tasks/

Create project in Project Online account

A project can be created in your Project Online account using the ProjectServerManager class:

Please note that project.Get(Prj.Guid) and project.Get(Prj.Name) properties should be unique within projects in the specified Project Online account.
Projects created in that way can be found in the “Working” store of your Project Online account (see screenshots below). The support of "Published" store will be available in future releases.

You can find the created project and store selection option in Microsoft Project Professional desktop application in “Open Enterprise Project” dialog (“File->Open->Project Web App->Browse” path):

Open Enterprise Project 1

Open Enterprise Project 2

Modify project in Project Online account

Also, you can modify a project in your Project Online account using the following syntax:

Working with on-premise Project Server(2016 or 2019)

Use the following code sample to create, read and update projects in on-premise Project Server (2016 or 2019) using ProjectServerManager class:

How to try

You can try part of the above mentioned features with your online projects in our free web Aspose.Tasks Downloader app - it uses the same engine under the hood. More info can be found in this blog post.

Top comments (0)