GemBox Support Forum

Presentationcore file not found

When trying to save an image from a presentation I get this error:

System.IO.FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'PresentationCore, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at ..ctor( , Boolean , Boolean , Boolean )
   at GemBox.Presentation.ImageSaveOptions.dl5jxnsk6dlbdpfy2yumqxup74u77ldg( , Stream , Boolean )
   at GemBox.Presentation.ImageSaveOptions.dl5jxnsk6dlbdpfy2yumqxup74u77ldg(PresentationDocument , Stream , String )
   at GemBox.Presentation.PresentationDocument.(Stream , String , SaveOptions )
   at GemBox.Presentation.PresentationDocument.Save(Stream stream, SaveOptions options)

This runs on an IIS site, aspnet core 3.1

You are missing a WPF reference. Just add this to the project file:

    <FrameworkReference Include="Microsoft.WindowsDesktop.App.Wpf" />