Skip to Content
avatar image
Former Member

getting exception after upgraded to .net framework 4

Hi,

I’m using Visual Studio with Crystal Reports 9 to create a Windows Form. I’ve changed the “Target Framework” of my project from 3.5 to 4.0. After that, I’ve started to receive an exception when I try to run my report. The exception says:

“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. The system cannot find the file specified.”

The strange thing is that this does not happen ALL the time. It usually gives that exception, but ones in a while the report runs fine. What is causing that?

Thanks so much.

Aron

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 12, 2014 at 10:59 AM

    Hi Aron,

    by Crystal reports 9 do you mean 9.0 file version?

    If yes, then you should upgrade Crystal version because CR 9 does not support .NET framewor 4.0 or 3.5 or 3.1 or even 2.0.

    See the compatibility chart.

    http://wiki.scn.sap.com/wiki/pages/viewpage.action?original_fqdn=wiki.sdn.sap.com&pageId=56787567

    With VS 2010 / 2012/ 2013 use SAP Crystal reports for Visual Studio SP10.

    - Bhushan

    Senior Engineer

    SAP Active Global Support

    Follow us on Twitter

    Got Enhancement ideas? Try the SAP Idea Place

    Getting started and moving ahead with Crystal Reports .NET applications.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 12, 2014 at 01:24 PM

    After you make sure you have the right version of the SDK as Bhushan outlined, one of the things that you need to be sure to do with the .NET 4.x framework is to go to the properties for each of the CrystalDecisions references and set "Embed Interop Types" to false. By default this is set to True.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 12, 2014 at 02:00 PM

    In your app.config file add this line:

    <startup useLegacyV2RuntimeActivationPolicy="true">

    PS - if you searched on the error you would have found multiple posts on how to fix that error.

    Don

    Add comment
    10|10000 characters needed characters exceeded