lkosson / reportviewercore

Recompilation of Microsoft.ReportViewer for .NET Core 3.1+
427 stars 123 forks source link

Error rendering images with new NuGet version 15.1.22 #194

Closed dsantos1998 closed 1 month ago

dsantos1998 commented 1 month ago

Hi all,

I have a .NET 8 web project using version 15.1.21 and the generation of .doc/.docx reports works correctly. The problem came when I wanted to build the new image with version 15.1.22 (the most recent one). Before you send me to the "Linux rendering solution" section, let me tell you that it loads the libraries related to the GDI+ plugin from my Dockerfile in the container and with the previous version, everything works correctly. For your interest, I load it like this:

apt-get update && apt-get install -y --no-install-recommends libc6-dev libgdiplus libx11-dev libxtst6 libxrender1 libxcb1 libx11-6 libsm6 libice6 libglib2.0-0 libfontconfig1 libfreetype6 libxft2 libxi6 libxrandr2 libxcursor1 libxinerama1 libpango1.0-0 libpangocairo-1.0-0 libatk1.0-0 libcairo2 libgdk-pixbuf2.0-0 libjpeg-dev libtiff-dev libgif-dev libharfbuzz-dev libwebp-dev

I have seen that the libraries for .NET 8 are updated from the following way: System.Drawing.Common 4.7.2 -> System.Drawing.Common 8.0.0 System.ServiceModel.Http 4.8.1 -> System.ServiceModel.Http 6.0.0

I have tried to look for any compatibility issues with the System.Drawing.Common 8.0.0 library and GDI+ but found nothing..

The error that Visual Studio 2022 returns is: System.drawing.common the type initializer for 'gdip' threw an exception

lkosson commented 1 month ago

Non-windows support for System.Drawing.Common has been deprecated in .NET 6 and removed completely in .NET 7.

dsantos1998 commented 1 month ago

Thank you!

I will still using the previous version.