Error running in a .Net Core class library

2 posts, 0 answers
  1. Nick
    Nick avatar
    8 posts
    Member since:
    Oct 2008

    Posted 08 Oct 2019 Link to this post


    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?  

  2. Neli
    Neli avatar
    255 posts

    Posted 11 Oct 2019 Link to this post

    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.

    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
Back to Top