Skip to content

Instantly share code, notes, and snippets.

@aspose-com-kb
Last active September 14, 2021 10:35
Show Gist options
  • Save aspose-com-kb/0b33c3ea96feb01d0846972d6fbb42f8 to your computer and use it in GitHub Desktop.
Save aspose-com-kb/0b33c3ea96feb01d0846972d6fbb42f8 to your computer and use it in GitHub Desktop.
Convert Microsoft Project File to XPS in C#. To learn more about this code gist please check this topic https://kb.aspose.com/tasks/net/how-to-convert-microsoft-project-file-to-xps-in-c-sharp/
using System;
//Use following namespaces to convert Microsoft Project file to XPS
using Aspose.Tasks;
using Aspose.Tasks.Saving;
namespace ConvertMicrosoftProjectFileToXPS
{
class Program
{
static void Main(string[] args)
{
//Set license before converting Project file to XPS
Aspose.Tasks.License AsposeTasksLicense = new Aspose.Tasks.License();
AsposeTasksLicense.SetLicense(@"c:\asposelicense\license.lic");
//Load input Project file
Project InputProjectFile = new Project("InputMicrosoftProjectFile.mpp");
//save output file in XPS format
InputProjectFile.Save("MPPConvertedToXPS.xps", SaveFileFormat.XPS);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment