Enabling Image Rendering with Report Viewer on Linux and Other Non-Windows Platforms in .NET 5 and .NET 6
The Bold Reports Report Viewer component uses the System.Drawing.Common
library to render images. However, in .NET 5 and .NET 6, the System.Drawing.Common
library is only supported on Windows platforms. This means that the Report Viewer will not render images on non-Windows platforms, such as Linux, Mac, and Kubernetes.
To enable image rendering in the Report Viewer on non-Windows platforms, you can set the System.Drawing.EnableUnixSupport runtime configuration switch to true in the runtimeconfig.json file. To do this, follow these steps:
-
Add the runtimeconfig.template.json file to your application.
-
Add the following configuration properties to the runtimeconfig.template.json file.
{
"configProperties": {
"System.Drawing.EnableUnixSupport": true
}
}
By enabling the System.Drawing.EnableUnixSupport flag, and the Report Viewer will start rendering images on non-Windows platforms like Linux, Mac, and Kubernetes.