This is a migrated thread and some comments may be shown as answers.

Error running in a .Net Core class library

1 Answer 458 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 09 Oct 2019, 12:02 AM

Hello,

I'm trying to get the ReportProcessor to work in a .Net Core class library (running as an Azure function) and attempting to load in a .trdp file (soon, it'll be multiple .trdp files) as the report source.  Upon hitting the endpoint, it almost immediately crashes with:

Telerik.Reporting: The type initializer for 'Telerik.Reporting.Processing.Common.FontContainer' threw an exception. System.Drawing.Common: System.Drawing is not supported on this platform.

I've tried installing the windows compatibility pack and system.drawing.common in futile attempts to get this working, but have not yet been able to.  Is this a limitation of Telerik reporting?  

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 11 Oct 2019, 02:35 PM

Hello Nick,

Our Rendering functionality relies on GDI+. GDI provides the fastest way to process text (measuring, splitting, aligning, etc.), which is essential to our product. In the Windows environment .Net runtime manages to resolve the GDI+ calls issued by System.Drawing.Common package natively. Unfortunately, Azure Functions do not support these calls by design. I'm afraid, we cannot provide a workaround or a fix, because we cannot control Azure Functions sandbox.

The option is to use another Azure plan - for example, Basic and higher App Service plans. Even these implementations have some GDI API restrictions that affect the image rendering.

You may test also our Azure demo.

Regards,
Neli
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Nick
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or