Skip to Content
avatar image
Former Member

Could not load file or assembly 'file:///C:\Program Files (x86)\SAP ... win\dotnet1\crdb_adoplus.dll'

I have seen a few solutions for this problem, (i.e. ) but I suspect they are for Windows Forms Applications. I'm writing User control libraries, and none of the solutions, which usually use modifications to the app.config file to fix it, work for me.

I hopefully uninstalled everything from SAP this morning and reinstalled CRforVS_13_0_5.exe. I'm still getting the error.

The 'dotnet1' folder does not exist on my system.

I'm using VB.NET (VS 2012 with Update 4,) SQL 2014 Developer for a back end, and operating in the Windows 7 pro (x64) environment. I've set all of my apps and referenced libraries I wrote to target the 64 bit platform, and to target .Net 4.5. When that didn't work I tried .Net 4.0.

All of my apps and reports were originally written in VB 2005 (.Net 2.0) and are converted when I first open the solutions in VB 2012.

I tried creating the missing folder (dotnet1), and copied the file referenced there only to get another message saying I was using a mixed mode application. Apparently something in my assembly was using .NET 2.0. I could not find it.

I have been chasing this problem all week but nothing I do works.

I would like to target 4.5, because we are moving everything into the cloud and the other app we use, Microsoft Dynamics NAV, I think uses that framework. But I am not that particular. I  have options in that regard. However, I do want it to be a 64 bit solution.

Any help or suggestions will be appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 17, 2015 at 09:36 PM

    New information.

    We have 2 types of reports in our system. Embedded, and standalone. The embedded reports are the ones I have a problem with. These reports are included as part of the project.

    All of the reports that are standalone are running ok. These reports are called by passing the filename to the CRViewer and opening using the zoom method.

    I still have not figured out why the embedded reports don't run when they have a connection to a database or to a dataset.

    Marshall

    ---Edit

    Also, I don't know if I mentioned it but I'm trying to do everything in 64 bit mode.th e original VB2005 projects were 32 bit. Most of the post about this problem are for 32 bit apps.

    I'm also not convinced the problem is with the data connections, since the problem disappeared when I called a standalone report. Even when data connections are used. The only difference is that the standalone reports have never been put through the conversion process. I'm not sure the embedded reports get converted, because every time I open one and save it, I get a warning saying the report w  ill be saved in the 'new' format.

    I've been developing in VB using CR since 1996. I'm not new to this and I am really disappointed that I'm having so much trouble with the installation and with finding answers from the one place I thought I'd get a good, quick answer.

    I am hard-headed and am fighting returning to a 32 bit model, but I may try that. It involves recompiling a dozen other DLL's but by the end of today, I just may. Please help me resolve this! Should I submit a support ticket? I need to do something and a week and a half without any production is unacceptable.

    Message was edited by: Marshall Youngblood

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Marshall,

      The absolute ONLY reason you will ever get this error: Could not load file or assembly 'file:///C:\Program Files (x86)\SAP ... win\dotnet1\crdb_adoplus.dll'

      Is because the ADO.NET driver requires legacy mode to work so it must have this in the start up section of your app.config file:

      <startup useLegacyV2RuntimeActivationPolicy="true">

      <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

      </startup>

      Framework is adjustable.

      If you do that then possibly there is another dependency you are missing. Process Monitor may tell you what that may be... Look for Access Denied errors also, could be a registry issue....

      I am curious if creating new test app like Ludek suggested works... Start from the basics and then start adding your dependencies....

      Also, can you confirm this is what you see in Programs and Features, I am using a current build of SP 15, what you should see is 13.0.14.1720 for the versions:

      Both Ludek and I have support Crystal for the same time as you. He's 19 years and I'm 18 years here...

      Don

      pastedImage_0.png (65.7 kB)
  • Aug 14, 2015 at 12:58 PM

    Please search, this has been answered 100's of time.

    Add this to your app.config file:

    <startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

    </startup>

    And upgrade to SP 14, we only support the latest 3 patches.

    Delete the folder you created, not needed.

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Marshall,

      Ah, you found the cause:

      "If you know of an answer I would appreciated it. Maybe I'm doing something wrong. I assumed you were talking about the app.config file that resides in the source code folder? (Note that it doesn't get copied to the debug or release folder when I run the project from the IDE. I've tried manually  copying it - no luck)"

      For some odd reason the app is not using it. Use ProcessMonitor to see if it's getting loaded, if not put it in a place it can and MAKE SURE the legacy section in startup is in there.

      And your test confirms if you don't use a data source it works...

      Don

  • Aug 17, 2015 at 05:10 PM

    I'll key in on this:

    All of my apps and reports were originally written in VB 2005


    Don't know if the below will apply as the info is not here to tell so it's all on a suspicion:


    Make sure that CR 10.2 (bundled with VS 2005) is uninstalled on the dev computer. CR 10.2 and CRVS (13.x) do not work well on the same dev box. Typically, no matter what, the version 10.2 assemblies will keep on insinuating themselves into your project causing all kinds of issues. So, if cr 10.2 is there, uninstall it. Check that all the CR references in your project are 13.0.2000.x. Recompile. Now try that project on the runtime box.




    - Ludek

    Senior Support Engineer AGS Product Support, Global Support Center Canada

    Follow me on Twitter

    Add comment
    10|10000 characters needed characters exceeded