Create an Empty Project File

Code Examples

VSTO

Below is the code to add project file in Microsoft Project

1Project project = this.Application.Projects.Add();

Aspose.Tasks

The Project class is the main class in Aspose.Tasks used to set and get properties associated with a project, as well as behavior. The Save method offered by this class makes it possible to render the Project to various output formats such as XML, MPP, PDF, HTML, etc. with a single API call. This method accepts a file stream or file name, and one of the values provided by the SaveFileFormat enumeration type.

At present, Aspose.Tasks for .NET provides the facility to create XML project files only. The following lines of code create a simple project file in XML format.

Below is code sample:

1Project project = new Project();
2project.Save("NewProject.xml", Saving.SaveFileFormat.XML);

Download Running Code

Download Sample Code

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.