Problem Deploying App That Uses ADOX

W

Wayne Wengert

The following is from another post I found in a different group (no answer
was given). It is exactly the problem I am having. Is there a solution?


===========================================
I used ADOX to implement a File New menu item that creates a new .mdb file.
It worked perfectly for development, but is causing problems now that I am
trying to create an installer.

The first indication of a problem I get is when I first add a setup project
to my solution. A message box says:

The following files may have dependencies that cannot be determined
automatically. Please confirm that all dependencies have been added to the
project.

c:\program files\common files\system\ado\msadox.dll

If I just press the OK button, and proceed with creating the installer,
everything seems fine until I try to build it, at which point I am told
that:

C:\Documents and Settings\Desktop\Setup1\Setup1.vdproj 'msadox.dll' should
be excluded because its source file 'C:\Program Files\Common
Files\System\ADO\msadox.dll' is under Windows System File Protection.

When I searched the web for phrases from this error message, I found very
little. A response to one person's query on a newsgroup was "just exclude
the file from the deploy project". Later I did indeed simply exclude
msadox.dll from the Setup project, and the solution did then successfully
build. But, as pointed out by one person on the web whose newsgroup query
went unanswered, if the program is then installed on a computer, using any
features that require the excluded file will crash the program. If I try to
use the New menu item on my program after installing it, I get the following
error message:

System.IO.FileNotFoundException: File or assembly name Interop.ADOX, or one
of its dependencies, was not found.

(Apparently some programs will still work even with excluded DLLs, as long
as other necessary programs are also on the computer, but this can't be true
in all cases; the computer I installed my program on did have Access on it.)

A couple of things I've already tried in order to fix the problem are adding
the MDAC merge module to my setup project, per the instructions at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q320788, and
installing versions 2.7 RTM and 2.8 of MDAC (which is said to contain the
ADOX DLLs) from http://www.microsoft.com/data/download.htm. Neither seemed
to have any effect.
 
P

Paul Clement

¤ The following is from another post I found in a different group (no answer
¤ was given). It is exactly the problem I am having. Is there a solution?
¤
¤
¤ ===========================================
¤ I used ADOX to implement a File New menu item that creates a new .mdb file.
¤ It worked perfectly for development, but is causing problems now that I am
¤ trying to create an installer.
¤
¤ The first indication of a problem I get is when I first add a setup project
¤ to my solution. A message box says:
¤
¤ The following files may have dependencies that cannot be determined
¤ automatically. Please confirm that all dependencies have been added to the
¤ project.
¤
¤ c:\program files\common files\system\ado\msadox.dll
¤
¤ If I just press the OK button, and proceed with creating the installer,
¤ everything seems fine until I try to build it, at which point I am told
¤ that:
¤
¤ C:\Documents and Settings\Desktop\Setup1\Setup1.vdproj 'msadox.dll' should
¤ be excluded because its source file 'C:\Program Files\Common
¤ Files\System\ADO\msadox.dll' is under Windows System File Protection.
¤
¤ When I searched the web for phrases from this error message, I found very
¤ little. A response to one person's query on a newsgroup was "just exclude
¤ the file from the deploy project". Later I did indeed simply exclude
¤ msadox.dll from the Setup project, and the solution did then successfully
¤ build. But, as pointed out by one person on the web whose newsgroup query
¤ went unanswered, if the program is then installed on a computer, using any
¤ features that require the excluded file will crash the program. If I try to
¤ use the New menu item on my program after installing it, I get the following
¤ error message:
¤
¤ System.IO.FileNotFoundException: File or assembly name Interop.ADOX, or one
¤ of its dependencies, was not found.
¤
¤ (Apparently some programs will still work even with excluded DLLs, as long
¤ as other necessary programs are also on the computer, but this can't be true
¤ in all cases; the computer I installed my program on did have Access on it.)
¤
¤ A couple of things I've already tried in order to fix the problem are adding
¤ the MDAC merge module to my setup project, per the instructions at
¤ http://support.microsoft.com/default.aspx?scid=kb;EN-US;q320788, and
¤ installing versions 2.7 RTM and 2.8 of MDAC (which is said to contain the
¤ ADOX DLLs) from http://www.microsoft.com/data/download.htm. Neither seemed
¤ to have any effect.
¤

You're missing the COM interop assembly (Interop.ADOX.dll) which is created when add ADOX to your
project. The file should be distributed in the bin folder.

You don't need to distribute the COM ADOX dlls.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
W

Wayne Wengert

Paul;

Thanks for the response. The file is in the bin folder when I look at the
results of a build. The Setup project creates an msi file (if I look at the
files in that - using ORCA - the Interop.ADOX.dll is there but it doesn't
end up in the application directory on the client's system after the
install?

Wayne
 
P

Paul Clement

¤ Paul;
¤
¤ Thanks for the response. The file is in the bin folder when I look at the
¤ results of a build. The Setup project creates an msi file (if I look at the
¤ files in that - using ORCA - the Interop.ADOX.dll is there but it doesn't
¤ end up in the application directory on the client's system after the
¤ install?
¤
¤ Wayne

Is the installer copying it somewhere other than the bin folder?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
W

Wayne Wengert

Paul;

I'll have them look for that. All the build parameters and the msi file show
it going to the application folder?

Wayne
 
P

Paul Clement

¤
¤ I'll have them look for that. All the build parameters and the msi file show
¤ it going to the application folder?

It should be copied to the application "bin" folder where your other local application assemblies
are located.


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top