Solved

Deployment:  System.IO.FileNotFoundException:

Posted on 2004-04-28
9
517 Views
Last Modified: 2007-12-19
I am deploying a small database program onto an office computer.  The program runs seemlessly on the computer it has been developed on.  I created an msi project to install the program.

When I run the program all is fine except for when I click on one button on a second dialog form.

The appropiate .Net Framework has  been installed on the computer where I am having trouble.

************** Exception Text **************
System.IO.FileNotFoundException: The specified module could not be found.
   at E_Tracker.AddRecord.Button3_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
E-Tracker
    Assembly Version: 1.0.1579.14858
    Win32 Version: 1.0.1579.14858
    CodeBase: file:///C:/Program%20Files/E-Tracker/E-Tracker_inst/E-Tracker.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 7.0.5000.0
    Win32 Version: 7.10.3052.4
    CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Interop.DSOleFile
    Assembly Version: 1.4.0.0
    Win32 Version: 1.4.0.0
    CodeBase: file:///C:/Program%20Files/E-Tracker/E-Tracker_inst/Interop.DSOleFile.DLL
----------------------------------------
0
Comment
Question by:NateDizzle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
9 Comments
 
LVL 5

Expert Comment

by:tgannetts
ID: 10939568
What does the button on the form attempt to do?

Tom  
0
 

Author Comment

by:NateDizzle
ID: 10939619
it displays a file dialog / folder dialog dependent on a variable.  Then it uses the dsolefile.dll to get the document properties (title) from a file if a file was chosen.

I originally assumed that the dsolefile was the problem, but it indicates  that it has been loaded and the dll file and interop file have been transferred to the other computer.
0
 
LVL 5

Expert Comment

by:tgannetts
ID: 10939744
My first thought was that it was probably the application unable to locate the Interop.DSOleFile.DLL. Is this definitely located in the application folder on the machine it is not working properly on?

If it is, then could you add the code that you are using for the button click.

Tom
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:NateDizzle
ID: 10939783
As I debug this myself I have discovered that the dsolefile is the problem specifically these two lines:

Dim PropReader As New DSOleFile.PropertyReader
Dim Props As DSOleFile.DocumentProperties
0
 

Author Comment

by:NateDizzle
ID: 10940270
OKAY!

So I solved it, vb was referring to the file path of the Dsole.dll on my computer.  So i pointed it to the c:\ drive and placed the dll in that folder in the other computer.

WHY doesn't vb redirect this reference when it moves the dll with the distribution package????  This is beyond me, it installed the dll onto the other computer but doesn't change the path of the reference.  There must be something I overlooked to get VB to do this, right?
0
 
LVL 5

Accepted Solution

by:
tgannetts earned 250 total points
ID: 10947180
The problem is that at run time, the program does not remember the original location of a DLL. It instead will check the usual assembly locations eg application directory, System folder etc. Unless it finds the dll in one of these locations it will throw an exception. Remember also that the IDE will often create wrapper dlls (for example when a project uses Office.Interop), which will not necessarily be found on other computers. These will have to be copied into the GAC, or one of the default assembly locations.

Tom.  
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 250 total points
ID: 11123208
You have to register COM components to get them to work.  Even if you have an Inter wrapper class, the DLL still needs to be registered.  You can fake it out sometimes, but it is not very forgiving.

Bob
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question