How to resolve the image not rendered issue in .NET 6.0 on Linux Environment

To fix images that do not render in the Bold Reports® Report Viewer on Linux with .NET 6.0, set the System.Drawing.EnableUnixSupport runtime configuration switch to true for your application.

After the release of .NET 6, the Report Viewer component stopped rendering images on non-Windows platforms. A breaking change restricted the System.Drawing.Common library to Windows only.

Because of the breaking change in .NET 6, applications that use the System.Drawing.Common library do not work on Linux, Mac, and other non-Windows platforms. The Report Viewer component therefore stops rendering images on Linux and other non-Windows platforms.

To let the Report Viewer render images on these platforms, set the System.Drawing.EnableUnixSupport runtime configuration switch to true in the runtimeconfig.json file. To enable this flag, follow these steps:

  1. Add the runtimeconfig.template.json file to your application.

  2. Add the following configuration properties to the runtimeconfig.template.json file.

{

  "configProperties": {

    "System.Drawing.EnableUnixSupport": true

  }

}

EnableUnixSupport

After you enable the System.Drawing.EnableUnixSupport flag, the Report Viewer renders images on non-Windows platforms like Linux, Mac, and Kubernetes.

See also