MPP File Viewer for .NET

Load Microsoft Project MPP files in C# and render project schedules as browser-ready HTML without Microsoft Project or Office Automation.

View MPP Project Files Programmatically in C#

Aspose.Tasks for .NET enables a .NET application to open an MPP file, read its project model, and render a selected project view to HTML. The generated output can be displayed in a browser, an ASP.NET application, an internal project portal, a document preview service, or a reporting workflow. Microsoft Project does not need to be installed on the development or deployment machine.

MPP is the native binary file format used by Microsoft Project. A project plan can contain task hierarchies, start and finish dates, durations, dependencies, calendars, resources, assignments, costs, progress values, and saved views. Rendering the file gives users a readable representation of that schedule while leaving the source document unchanged.

The Project class provides access to the loaded plan, while HtmlSaveOptions controls the browser-oriented output. This approach is useful when users need to inspect a project without editing it, when a server must create previews for uploaded plans, or when a business system needs to publish current schedule information to people who do not use Microsoft Project.

How to View an MPP File in C#

The basic viewer workflow loads the MPP document, creates HTML rendering options, saves the selected project view, and then opens the resulting file. The example below presents that sequence in a compact form.

C# Code to View an MPP File

// load MPP file in an instance of Project
var project = new Tasks.Project("template.mpp");
// create an instance of HtmlSaveOptions
var option = new Tasks.Saving.HtmlSaveOptions();
// convert MPP file to HTML format
project.Save("output.html", option);
// load resultant HTML in default browser
System.Diagnostics.Process.Start("output.html");

What the MPP Viewer Code Does

The example follows four stages:

  1. The MPP file is loaded into a Project instance. This object represents the project plan and gives the application access to tasks, resources, assignments, calendars, properties, and views.
  2. HtmlSaveOptions is created to define HTML as the rendered presentation and to expose the settings available for the generated view.
  3. Project.Save writes the project presentation to an HTML file. The source MPP document is not modified by this viewing workflow.
  4. The final line opens the generated output in the default desktop browser. In an ASP.NET or service-side application, the usual approach is instead to store or stream the generated result and return it through the application’s own response pipeline.

For a production viewer, validate uploaded files, use controlled temporary locations, apply file-size and processing limits, and remove generated resources according to the application’s retention policy.

Install the MPP Viewer API from NuGet

Add Aspose.Tasks for .NET from NuGet to the project that performs the rendering. The package supplies the project file parser, object model, and save options used by the viewer workflow. No Microsoft Project installation or COM automation setup is required.

You can install the package through Visual Studio’s NuGet Package Manager or run the following command in Package Manager Console. For supported frameworks, deployment requirements, and release-specific information, consult the Aspose.Tasks for .NET documentation and the downloads page .

Package Manager Console

PM> Install-Package Aspose.Tasks

Choose What the MPP Viewer Renders

HTML rendering is not limited to a plain list of tasks. Depending on the project data and the selected settings, an application can prepare views suited to schedule review, resource planning, or progress reporting. Relevant options include:

  • Gantt Chart output for task timing, hierarchy, milestones, and dependency context.
  • Task Sheet or Task Usage presentations for task-centered review.
  • Resource Sheet or Resource Usage presentations for resource and assignment analysis.
  • FitContent when long task or resource text needs additional row height.
  • StartDate and EndDate when the viewer should focus on a specific schedule period.
  • Timescale, page selection, gridline, text style, and project-title controls.
  • ViewSettings when the application must render a compatible view stored in the project.
  • CSS, font, and image export settings for embedded or separately stored HTML resources.

Large plans become easier to review when the rendered date range and view match the user’s task. A focused preview can also reduce the amount of generated content that the application must store and deliver.

MPP Format Details and Viewer Use Cases

MPP files are commonly exchanged as the authoritative version of a Microsoft Project schedule. Aspose.Tasks supports loading Microsoft Project MPP files from multiple product generations, including modern MPP versions, and exposes their project data through one .NET object model.

An MPP viewer is useful for approval portals, project-management dashboards, bid and contract reviews, schedule archives, upload validation, and automated status reporting. The rendered result can help reviewers inspect dates, critical activities, resource assignments, and progress without granting access to the editable source plan.

MPP and MPT serve different purposes. An MPP file normally represents a working project plan, while an MPT file is a reusable Microsoft Project template. Use the dedicated MPT viewer when the input is a template rather than an active plan.

MPP Viewer Documentation and Resources

MPP Viewer FAQ

Can a .NET application view an MPP file without Microsoft Project?

Yes. Aspose.Tasks for .NET loads the MPP document and renders a project view without requiring Microsoft Project or Microsoft Office Automation on the host machine.

Can I render an MPP file as HTML for an ASP.NET application?

Yes. Load the MPP file with the Project class, save the required view with HtmlSaveOptions, and deliver the generated HTML and its resources through the application’s normal response and access-control workflow.

Which MPP information can be shown in the rendered view?

The result can represent project information such as tasks, dates, hierarchy, dependencies, resources, assignments, progress, and Gantt chart data. The visible content depends on the selected presentation and the data stored in the source plan.

Does viewing an MPP file change the original project?

No. Loading and rendering the project to HTML does not require overwriting the source MPP file. The viewer output is created as a separate result.

Can I limit the period displayed in an MPP preview?

Yes. HTML save options include start-date, end-date, timescale, page, and view controls that can be used to focus the rendered schedule on the information required by the user.

Related MPP Processing Workflows

Other Project File Viewers for .NET

Use the dedicated viewer page that matches the project file supplied to your application.