AR14 - FileNotFoundException when rendering PageReport in .NET Core 3.0 web app

Posted by: rafael.mandler on 10 February 2020, 5:15 am EST

    • Post Options:
    • Link

    Posted 10 February 2020, 5:15 am EST

    I am attempting to render a PageReport in a .NET Core 3.0 web app for AR14. I downloaded the GrapeCity.ActiveReports.Export.Pdf NuGet package (version 14.0.19313), which claims to work for .NETCoreApp version 3.0 as well as .NETFramework version 4.6.2.

    As a simple test, I try to invoke the example at this link https://www.grapecity.com/activereports/docs/v14/online/rendering-to-pdf.html in a MVC controller action method, with paths and file names changed for my test purposes.

    When doing so, I see the following exception:

    FileNotFoundException: Could not load file or assembly ‘System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. The system cannot find the file specified.

    In another web project I get a similar exception, except it is looking for a System.Windows.Forms assembly of that same version (4.0.3.0). Is this code only supported in Windows Forms? Or do I need a different NuGet package for .NET Core support?

  • Posted 10 February 2020, 6:25 pm EST

    Hello,

    Can you try after adding the ConfigurationManager in your project?

    Install-Package System.Configuration.ConfigurationManager
    
    

    or you can use Microsoft.Windows.Compatibility pack to avoid the exception.

    Thanks,

    Mohit

  • Posted 11 February 2020, 7:03 am EST

    Thank you! The System.Configuration.ConfigurationManager seems to have worked. As for the Windows Forms, I think that might have been because I was using an obsolete PdfExport.Export method.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels