MPX File Viewer for .NET
Load Primavera MPX project files in C# and render schedule information as browser-ready HTML without installing a desktop project-management application.
View Primavera MPX Project Files Programmatically in C#
Aspose.Tasks for .NET can load an MPX project file into a .NET application and render its imported schedule data to HTML. The result can be displayed in a browser, an ASP.NET preview, an internal planning portal, or an automated migration report. The workflow does not depend on Microsoft Project or Primavera being installed on the host machine.
MPX is a text-based project interchange format associated with project-management data exchange and supported by Primavera workflows. It can carry schedule information such as tasks, dates, calendars, resources, assignments, and other project fields. Rendering the imported model gives reviewers a readable view of the schedule before data is migrated, merged, converted, or accepted by another system.
The API uses the same central Project class for MPX and other supported project formats. Once loaded, the schedule can be rendered with HtmlSaveOptions using a Gantt-oriented, task-oriented, or resource-oriented presentation. This makes the page relevant to integration teams handling legacy project exchanges, Primavera data migration, archive review, and cross-system validation.
How to View an MPX File in C#
The example loads an MPX file, prepares HTML rendering options, writes the presentation, and opens the result. It presents the viewer sequence in a compact form.
C# Code to View an MPX File
// load MPX file in an instance of Project
var project = new Tasks.Project("template.mpx");
// create an instance of HtmlSaveOptions
var option = new Tasks.Saving.HtmlSaveOptions();
// convert MPX file to HTML format
project.Save(output, option);
// load resultant HTML in default browser
System.Diagnostics.Process.Start(output);
What the MPX Viewer Code Does
The viewer example represents these operations:
Projectreads the MPX source and maps supported schedule data into the Aspose.Tasks project model.HtmlSaveOptionsprovides the HTML rendering configuration used for the preview.Project.Savecreates a separate HTML representation without overwriting the MPX source.- The generated result is opened in a desktop browser. In an ASP.NET service, the output would normally be returned through the application’s own storage, response, authentication, and cleanup process.
For migration and upload scenarios, validate that the document is a supported MPX project file instead of trusting its extension. Apply size, time, and memory limits, and report unsupported or damaged source data clearly to the caller.
Install the MPX Viewer API from NuGet
Add the Aspose.Tasks for .NET NuGet package to the project responsible for importing and rendering MPX schedules. The same package provides the project parser, object model, visualization types, and save options used throughout the workflow.
Install it with Visual Studio’s NuGet Package Manager or the Package Manager Console command below. Check the Aspose.Tasks documentation for current platform guidance and the release page for downloadable product versions.
Package Manager Console
PM> Install-Package Aspose.Tasks
Render MPX Schedule Data for Review
After the MPX data has been imported, the application can select a presentation that matches the review task. HTML save controls include:
- Gantt Chart output for task hierarchy, timing, milestones, and dependency context.
- Task Sheet and Task Usage views for activity-oriented review.
- Resource Sheet and Resource Usage views for resources and assignments.
FitContentfor rows containing longer task or resource values.StartDate,EndDate, andTimescaleto focus on the relevant schedule interval.- Page selection and compatible stored views through
ViewSettings. - Gridline, text style, page layout, title, and header options.
- CSS, font, and image handling for self-contained or multi-resource HTML output.
MPX is an interchange format, so the source may not contain every visual setting expected from a native Microsoft Project file. The viewer should focus on the project information successfully represented by the imported model rather than promise an identical recreation of another desktop application’s interface.
MPX Format Context and Migration Use Cases
The MPX page should be understood in the context of Primavera and project-data interchange, not Microsoft Exchange email. Aspose.Tasks documents MPX among its supported Primavera-oriented formats and provides import and export workflows for project information.
Typical viewer scenarios include checking an MPX file before migration, presenting legacy schedules in a web portal, validating data supplied by an external planning system, and comparing imported task or resource information before conversion. Because MPX is text based and may originate from older tools, the application should be prepared for differences in available fields and formatting.
MPX and MPP are not interchangeable labels. MPP is a native Microsoft Project plan format, while MPX is used for project information exchange. Use the MPP viewer for Microsoft Project plans and this page when the input is an MPX interchange file.
MPX Viewer Documentation and Resources
- Review the
Projectclass used to load MPX and other project formats. - Use
HtmlSaveOptionsto configure the generated project view. - Confirm current MPX capabilities in the supported file formats table.
- Read the Primavera import and export guide for MPX-specific workflow context.
- Try the free online MPX viewer for manual file inspection.
MPX Viewer FAQ
What kind of MPX file does Aspose.Tasks load?
Aspose.Tasks supports MPX as a project-management interchange format in its Primavera-oriented workflows. The file is loaded into the common Project object model for processing and rendering.
Can I view MPX schedule data without Primavera or Microsoft Project?
Yes. The .NET library loads the supported MPX data and renders a selected project view without requiring either desktop product on the host machine.
Can an MPX file be rendered as a Gantt chart?
The imported project can be rendered with a Gantt Chart presentation when the source contains the schedule information needed for that view. The visible result depends on the data represented in the MPX file.
Is MPX the same format as MPP?
No. MPP is a native Microsoft Project plan format, while MPX is a text-based project interchange format used in cross-system and Primavera-related workflows.
Can I use the MPX viewer during a migration?
Yes. Rendering the imported schedule provides a practical review step before the project is converted, merged, or accepted by another planning system.
Related MPX Processing Workflows
- Return to the Microsoft Project Viewer for .NET for the full viewer format list.
- Convert MPX to PDF in C# when the schedule needs a fixed-layout report.
- Convert MPX to MPP in C# when the workflow targets a Microsoft Project plan.
- Merge MPX data into an MPP file for supported consolidation scenarios.
- Visit the Aspose.Tasks for .NET product page for downloads, licensing, and API capabilities.
Other Project File Viewers for .NET
Open the viewer page that corresponds to the source project format.