How to Extract Microsoft Project File Metadata in C#

This step by step tutorial shows you how to extract Microsoft Project file metadata in C#. We’ll extract MPP file metadata in C# code without requiring Microsoft Project itself. The metadata is important part of the Project files and can be used in different ways to process information. The code can be used with any .NET technology whether Web or Desktop.

Steps to Extract Microsoft Project File Metadata in C#

  1. Install Aspose.Tasks for .NET package from NuGet.org
  2. Include Aspose.Tasks namespace
  3. Apply Aspose license with the help of SetLicense method
  4. Load input Microsoft Project file (.mpp) using Project class
  5. Extract metadata info from the MPP file using Get method
  6. Save extracted metadata into variables or files as needed

By following the simple steps above, you can easily get MPP file metadata in C# with a few lines of code. The API saves you a lot of hassle and time.

Code to Extract Microsoft Project File Metadata in C#

In this code snippet, we’re getting only four metadata properties like Author, Category, Company, and Comments, but you can get other metadata using the same code. We have stored the information in string variables and displayed, but you can either save it to a file, a database, or use however you like. With the help of this code, you can also create your own Microsoft Project metadata extractor in C# within no time.

 English