none
Could not load file or assembly 'ADODB, Version=7.0.3300.0, Culture=neutral...

    Question

  • Hi,

    while runing a .net setup project i got the following error:

    Could not load file or assembly 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified

    any idea ?

     

    Thanks,

    Tarek Ghazali

    SQL Server MVP

    Monday, February 27, 2006 12:19 PM

Answers

  • I stumbled upon this thread while looking for a solution to (what I assume to be) the exact same problem describe by the original poster.  I was going to post my reply to the thread Jason K linked, but felt my response is more approriate to this forum.

    The problem in a nutshell is that the ADODB.dll is a Primary Interop Assembly that comes with the Framework SDK, but not the Framework redistributable -- you can't expect to find it installed on a 'normal' user's PC.  Jason K's solution was to manually copy the ADODB.dll to the client PC and also manually install it into the GAC.

    Unfortunately, this solution isn't viable in a ClickOnce deployment situation, unless you create a special pre-requisite installer that the bootstrapper installer can work with which will install the ADODB.dll into the GAC -- entirely possible, but more of a pain than necessary.

    The solution should be as simple as specifying the ADODB PIA reference to "Copy Local" when your project builds, thereby not requiring the ADODB PIA to be installed into the GAC. Unfortunately, for whatever reason, that doesn't work during deployment.  Err, I mean, ADODB.dll will be copied to your build path, but upon deployment, the executables .manifest specifies the ADODB.dll as a 'preRequisite' -- requiring it be installed in the GAC before ClickOnce will install the app.

    What fixed the 'preRequisite' problem for me was, (after setting the ADODB PIA reference to Copy Local,) was changing my project's publish settings:

    Goto:
    • Project Properties Page
    • Publish Tab
    • Click "Application Files..." button
    • Change ADODB.dll's Publish Status from "Include (Auto)" to "Include"
    Upon publishing, the project's .manifest now specifies the ADODB PIA as 'install' instead of 'preRequisite'!  During the ClickOnce installation, ClickOnce copies the ADODB.dll to the applications path, not requiring it be in the GAC!

    Hope this helps...

    Jason P.


    Wednesday, March 29, 2006 8:41 PM

All replies

  • I think this post is the same problem your having

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=221287&SiteID=1

    I posted a solution at the bottom that fixed it for me

     

    Hope this helps

    Jason

    Tuesday, February 28, 2006 4:51 PM
  • I stumbled upon this thread while looking for a solution to (what I assume to be) the exact same problem describe by the original poster.  I was going to post my reply to the thread Jason K linked, but felt my response is more approriate to this forum.

    The problem in a nutshell is that the ADODB.dll is a Primary Interop Assembly that comes with the Framework SDK, but not the Framework redistributable -- you can't expect to find it installed on a 'normal' user's PC.  Jason K's solution was to manually copy the ADODB.dll to the client PC and also manually install it into the GAC.

    Unfortunately, this solution isn't viable in a ClickOnce deployment situation, unless you create a special pre-requisite installer that the bootstrapper installer can work with which will install the ADODB.dll into the GAC -- entirely possible, but more of a pain than necessary.

    The solution should be as simple as specifying the ADODB PIA reference to "Copy Local" when your project builds, thereby not requiring the ADODB PIA to be installed into the GAC. Unfortunately, for whatever reason, that doesn't work during deployment.  Err, I mean, ADODB.dll will be copied to your build path, but upon deployment, the executables .manifest specifies the ADODB.dll as a 'preRequisite' -- requiring it be installed in the GAC before ClickOnce will install the app.

    What fixed the 'preRequisite' problem for me was, (after setting the ADODB PIA reference to Copy Local,) was changing my project's publish settings:

    Goto:
    • Project Properties Page
    • Publish Tab
    • Click "Application Files..." button
    • Change ADODB.dll's Publish Status from "Include (Auto)" to "Include"
    Upon publishing, the project's .manifest now specifies the ADODB PIA as 'install' instead of 'preRequisite'!  During the ClickOnce installation, ClickOnce copies the ADODB.dll to the applications path, not requiring it be in the GAC!

    Hope this helps...

    Jason P.


    Wednesday, March 29, 2006 8:41 PM
  • Hi.  I've been baffled by the same problem that you were having and couldn't get my app to run under Win XP.  I finally got our systems guy to help me and this was the answer to my problem. 

     In your C:\windows\assembly\gac folder, create a folder for adodb and then within it, make another folder 7.0.3300.0__b03f5f7f11d50a3a.  Copy the ADODB.DLL to this folder.   We had to do this thru the Cmd window because the GAC folder is not visible from windows explorer.  It solved my problem and the app runs fine now.

     

    Cathy

     

    Wednesday, August 23, 2006 4:33 PM
  • I though that these primary assemblies only work from the GAC. If you run your program in debug mode it references the assembly in the GAC even if you include the assembly in your program and reference it.

    Maybe changing it to "include" in the "Applications Files" will satisfy the clickonce installer, but when the program runs if it uses the assembly it will only try and find it in the GAC.  Any included assembly will be ignored.  So maybe installing it in the GAC is the only answer.

     

     

    Geoff 

    Sunday, January 14, 2007 11:22 AM
  •  

    This suggestion is a good one.  It also solved one problem.  Make sure that you type two underscores in the string: 7.0.3300.0__b03f5f7f11d50a3a
    Monday, September 17, 2007 7:24 PM
  • mzKitty , Your post helped, 10x

    Tuesday, July 01, 2008 7:21 AM
  • this solution fixed my problem.

     

    Thanks a lot for the help!

    Roberto

    Friday, October 03, 2008 9:55 PM
  • Right click on solution header. hit properties,

    Last tab on left is publish

            Under install mode and settings there are a couple of buttons

        1st button app files, click

        ON that list was ADODB and the options should say (Include required include)

    This will then install during set up

    Thursday, January 29, 2009 6:53 PM
  • Thank you! it works!
    Saturday, October 24, 2009 5:31 PM
  • Thanks Jason, A lot of Thanks.

    Today i got stuck on this issue but thanks to you, I resolved that issue (by the method described by you) :)

    Pro_Zee
    Saturday, February 13, 2010 8:43 AM
  • Many thanks. It worked for me
    Monday, November 05, 2012 5:38 PM