The MPP is one of the primary formats of Microsoft Project, commonly used to store workloads, schedules, and finances. Since its first release in 1984, it has helped teams manage projects, develop schedules, set budgets, and allocate resources. The MPP format is the native file type for Microsoft Project and retains all project information when saved. In contrast, the XER file format is a proprietary format used by Primavera P6 for project planning and management. When you need to convert MPP files to XER, you can choose an on‑premises tool or a cloud‑based solution.
Microsoft Project processing API
Microsoft Project and Primavera P6 are widely adopted for handling project assignments, tasks, resources, calendars, attributes, and scheduling data. To enable developers to work with these formats programmatically, we created the Aspose.Tasks Cloud REST API. It lets you retrieve project assignments, add new assignments, list tasks, change task positions, add calendars, obtain time‑scaled data, and more—without installing any third‑party software.
We also provide the Aspose.Tasks Cloud SDK for .NET, a .NET wrapper around the REST API that simplifies integration of project‑management features into your .NET applications.
Installation
To start using the .NET Cloud SDK, install it via NuGet or GitHub. Run the following command in your terminal:
nuget install Aspose.Tasks-Cloud
If you prefer the NuGet Package Manager console, use:
PM> Install-Package Aspose.Tasks-Cloud
Visual Studio approach
You can also add the package directly from Visual Studio:
- Open Solution Explorer.
- Expand your project and right‑click the Packages folder.
- Choose Manage NuGet Packages….
- Switch to the Browse tab and search for Aspose.Tasks-Cloud.
- Select the desired version and click Add Package.
Image 1:- Aspose.Tasks-Cloud as NuGet package.
Free Cloud subscription
Access to the Cloud APIs requires a free Aspose.Cloud subscription, which provides up to 150 free document‑processing requests—no credit card needed. Sign up via the Aspose.Cloud dashboard using a GitHub or Google account, or click the Create a new Account button and fill in the required details. After logging in, navigate to Applications → Client Credentials to retrieve your Client ID and Client Secret.
Image 2:- Client Credentials at Aspose.Cloud dashboard.
MPP to XER in C#
Follow these steps to convert an MPP file to Primavera P6 XER within a C# .NET application:
- Create a Configuration object with your Client ID and Client Secret.
- Instantiate the TasksApi using the Configuration object.
- Upload the local MPP file to cloud storage via UploadFile(..).
- Build a GetTaskDocumentWithFormatRequest, specifying the input MPP name and the target format from the ProjectFileFormat enumeration.
- Call GetTaskDocumentWithFormat(…) to start the conversion.
- Save the resulting XER file locally using File.Create inside the saveToDisk(…) method.
Convert MPP to Primavera P6 using cURL
cURL provides a quick way to interact with the REST API from the command line. First, generate a JSON Web Token (JWT) using your Client ID and Client Secret from the Aspose.Cloud dashboard:
curl -v "https://api.aspose.cloud/connect/token" \
-X POST \
-d "grant_type=client_credentials&client_id=4ccf1790-accc-41e9-8d18-a78dbb2ed1aa&client_secret=caac6e3d4a4724b2feb53f4e460eade3" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"
After obtaining the JWT, run the following command to convert the MPP file stored in cloud storage to XER:
curl -X GET "https://api.aspose.cloud/v3.0/tasks/Home%20move%20plan.mpp/format?format=xer&returnAsZipArchive=false" \
-H "accept: multipart/form-data" \
-H "authorization: Bearer <JWT Token>" \
-o Converted.xer
The sample file used in the example can be downloaded from Home move plan.mpp.
Conclusion
This article demonstrated how to convert Microsoft Project (MPP)16 files to Oracle Primavera P6 XER format using both C# code and cURL commands. The Aspose.Tasks Cloud pricing model is usage‑based, so you only pay for the API calls you make—starting as low as $0.005 per request. A free account grants up to 150 processing requests, allowing you to evaluate the service before purchasing a license. For detailed pricing, visit the pricing page.
All SDKs are released under the MIT License; you can download the full source code from GitHub. If you encounter any issues or have questions, feel free to reach out via the Free Support forum.
Related articles
We also recommend visiting following links to learn more about: