Reporting .NET/.NET Core Limitations
- 2 minutes to read
- Export to EMF and WMF image formats is not supported on Linux.
- Deserialization from CodeDOM format is not supported.
- The ImageExportOptions.Resolution property does not work in Linux- and Mac-based environments.
- Mac-based environments cannot embed fonts in exported PDF files.
System.Drawing.Common Package
Version 6
With the release of .NET 6, the System.Drawing.Common library is compatible with Windows only. See the following Microsoft documentation topic for more information: System.Drawing.Common only supported on Windows.
An application that is built for non-Windows platforms throws the following exception:
System.TypeInitializationException : The type initializer for 'Gdip' threw an exception.
This breaking change affects DevExpress Reporting as we use the System.Drawing.Common library to render reports.
Use one of the following options to fix this issue:
Replace the System.Drawing.Common library with the earlier version 5.0.3.
Version 5.0.3 retains compatibility with Linux, MacOS, and other platforms. An application built for these platforms does not throw the exception described above. Note that Microsoft does not issue fixes for non-Windows bugs and vulnerabilities.
As a temporary workaround, enable the System.Drawing.EnableUnixSupport configuration property to prevent the exception on non-Windows platforms. You should add a runtimeconfig.template.json file to your project with the following code:
{ "configProperties": { "System.Drawing.EnableUnixSupport": true } }
This file is a template for the runtimeconfig.json files generated by your project. For more information, review the following help topic in Microsoft documentation: .NET Runtime configuration settings.
Version 7 and Higher
The following features are not available in the Reporting tools if you use the DevExpress.Drawing.Common
package v7 and higher in non-Windows environments:
- DPI settings
- TextAlignment = Justify
You can call the DevExpress.Drawing.Internal.DXDrawingEngine.ForceSkia()
method at application startup to force enable the new Skia-based drawing engine. Note that this API is marked as internal and we may change it in the future.