System.IO.Compression reference

Posted by: mdynna on 27 March 2024, 4:27 am EST

    • Post Options:
    • Link

    Posted 27 March 2024, 4:27 am EST - Updated 27 March 2024, 4:32 am EST

    We’re using Active Reports 17 and when exporting to XLSX format the attached error appears referencing version 4.0.0 of System.IO.Compression.

    We have the following binding redirect in our application config file:



    If I remove the binding redirect and place version 4.0.0 of the DLL in our application folder then the export completes successfully. There seems to be something in the Excel export library that is referencing version 4.0 of that DLL specifically?

  • Posted 27 March 2024, 4:06 pm EST

    Hi Mark,

    The ‘Could not load…’ errors occur when you are using an incompatible version of a package in your project with respect to ActiveReports.

    As you mentioned it looks like in an older version of your application you had a binding redirect to the ‘System.IO.Compression’ package, however, as you upgraded your project the reference to this package in your project also got updated but due to the binding redirect specified the package got redirected to the older version and hence the error.

    Please feel free to remove the binding redirect or update the version within the binding redirect to the version it is looking for in the error and the project will work as expected.

    Regards,

    Anand

  • Posted 28 March 2024, 2:21 am EST

    I don’t see how the reference could have been redirected to an older version. I see my quote of the binding redirect didn’t get pasted:

    <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />

    I’ve checked all references in our application and everything points to version 4.2 of System.IO.Compression, it seems something internal to the Excel Export is referencing version 4.0. We’re currently using version version 17.0.2 of GrapeCity.ActiveReports.Export.Excel. The NuGet info doesn’t list System.IO.Compression as a dependency, can you confirm if a newer version of this library would reference the newer version of System.IO.Compression?

  • Posted 31 March 2024, 7:00 pm EST

    Hi Mark,

    It would be difficult to comment upon the exact cause of the issue without actually going through a replicating sample, could you please share a minimal sample that replicates the issue so we can test the same on our end and further investigate the issue.

    Thanks,

    Anand

Need extra support?

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

Learn More

Forum Channels