Error converting tiff to pdf

Hi, I’m trying to convert a tiff image to pdf using the example here Convert PNG, GIF, TIFF, and JPG Images to PDF in C# and VB.NET

but i’m getting the following error below. I looked up SkiaSharp and I’m reading post that says they don’t support TIFF but the example page above says gembox support TIFF so does that mean I’m suppose to be using a different library to do the TIFF other than SkiaSharp ?

System.InvalidOperationException: ‘Bitmap decoding failed. ‘WPF’ was not found on the system. If the platform on which the application is running supports ‘WPF’, make sure that your project uses it. ‘System.Drawing’ was not found on the system. If the platform on which the application is running supports ‘System.Drawing’, make sure that your project uses it. ‘SkiaSharp’ threw an exception of type ‘System.NotSupportedException’ and with message ‘SkiaSharp encountered an unknown bitmap decoding error.’. For more details about the exception, see the inner exception. ‘ImageSharp’ was not found on the system. If the platform on which the application is running supports ‘ImageSharp’, make sure that your project uses it. ‘GemBox’ threw an exception of type ‘System.NotSupportedException’ and with message ‘Specified method is not supported.’.’

Hi,

What is your targeted framework?
If you’re targeting “net6.0”, can you try using “net6.0-windows”?

Regards,
Mario

this is a web app. Can I target net6.0-windows in an mvc web app?

nevermind you can set the target to net6.0-windows but it’s not listed as an option in my visual studio I had to edit the project files directly but that seem to have resolve the issue