Skip to Content

Error when viewing report via website vs 2017

hi, hope someone can help as really stuck on this. I have a website project that was originally created in dotnet 2 and uses crystal reports. The old server it sits on is windows 2008 r2. the appPool is targeting framework 2. Up until recently I was using visual studio 2010 to ammend the report files while using 2013 community to build, compile and release the website as a whole.

We have moved everything to windows server 2016 and im trying to get everything to compile in vs 2017. I've downloaded cr for vs service pack 21 and ive tried changing the references and updating all crystal inserts within the config to 13.0.3500.0 from 3.0.2000.0. I've also tried changing the apppool from 2 to 4 but i still get the below error when i step through the code at rep.load (load report).

An unhandled exception of type 'System.BadImageFormatException' occurred in Unknown Module. Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. occurred

Any help would be appreciated


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 23, 2018 at 10:15 PM

    Hi Angela,

    In your app.config file you should have a startup tag and in it there is a Legacy mode to use in legacy mode since 2.0 did not support the updated framework for ADO.NET.

    Remove that tag and it should work.


    Add comment
    10|10000 characters needed characters exceeded