Hi
I have created a simple .NET 6.0 application to convert an image to PDF.
For this I use Aspose.Drawing instead of System.Drawing.Common.
But when I run the application, I get an error: Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly ‘System.Drawing.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. The specified file cannot be found.
File name: ‘System.Drawing.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’
at Aspose.Imaging.Image.#=zdhS8Vtln7VSf(StreamContainer #=z9ROXOM6FvRVD, LoadOptions #=zYCOM1eZ$0uII)
at Aspose.Imaging.Image.Load(String filePath)
at Program.$(String[] args) in C:\Users\Yura\Documents\Visual Studio 2022\Projects\ConsoleApp1\ConsoleApp1\Program.cs:line 7
What have I done wrong?
If I use Aspose.PDF instead of Aspose.Imaging to insert images, then the error is the same.
using (var pdf = new Aspose.Pdf.Document())
{
using (var bitmap = new Bitmap(input))
{
ConsoleApp1.zip (25.1 KB)