Error: Could not load file or assemblye 'System.Windows.Forms

Hello there. I'm developing an Azure Function running on a dotNet core 3.1 platform. The project uses the PdfLoadedDocument class, and when I try to use the save function and I pass a Stream as the parameter, I get the following error:

Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context.

Any idea how to fix this?

Thank you for your attention.



1 Reply

SV Surya Venkatesan Syncfusion Team January 5, 2022 11:47 AM UTC

Hi João Rosa,


We recommend you try installing Syncfusion.Pdf.Net.Core for .NET core via NuGet Package Manager if already installed clear the package folder and then reinstall. if the issue persists, kindly share your sample with us to address the issue and provide the solution earlier.


Regards,

Surya V


Loader.
Up arrow icon