Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Bizzare error while running exe after installation
 

Bizzare error while running exe after installation

I have a bizzare problem with a regular setup project. I finished my project and bundled it witha Deployment project.

The installation goes smooth without any problems but on some computers I get an unhandled error:

EventType : clr20r3 P1 : <My executable program name>.exe P2 : 0.3.2.1
P3 : 47595c90 P4 : <dll project name>. P5 : 0.3.2.1 P6 : 47594cb4
P7 : 12a P8 : 32 P9 : system.io.filenotfoundexception

After some investigation I found out the following:
1. The errordidn't occure on any of the three computers I used to develop the program -Visual Studio was installed on each oneof them

2. The splash screen is being shown before the error occurs - so atleast I know the program loads.

3. The error occursin theInitializeComponent() of the main form.

* I checked the files, dlls, and executables in the application folder. In both cases (on computers that it works, and on computers that it doesn't work) all the files are there.

*I don't know if it matters but in the Deployment project I have two assembly references to the same dll(not the one mentioned in the error) but in different versions.Both references are automaticly added to the deployment project when I add the Main outputof <My executable program name>..I worked around the problem and it installs only the newer version. Just thought it might have a connection and give you a clue.

Hope I gave enough information, ask for more if you need.

I really need help on this one.

Thanks Smile

stige  Friday, December 07, 2007 9:07 PM

One helpful thing you might want to consider for your future development efforts is to put in an Unhandled error handler in the main program execution space so that unhandled errors would be easier to track down.

Also, you should clean up your references. If they are the same reference, and provide the same functionality then you should remove the older one. With this said, if the versions are different, it shouldn't be a reference problem. Then again, it may be that the referenced that component doesn't like it.

Are you accessing a config file or something in the Main application form? If so check to be sure that the file is there and the user has access to the file. Also, are you using any third party components that may be installed on your machine, but not on the deployment machine? There might be something you are referencing in the GAC, or dll cache that isn't installed on the target machine. Also, the third party components might be looking for something that is missing. Are you trying to access any files in the startup of the form, such as, the Application Data directory or somethig?

Let me know.

Joe

Joe Fairchild  Friday, December 07, 2007 9:22 PM

Thanks alot for all the tips.

I will work on the error handler you mentioned.

While trying all the tipsI just catched the error and found out the problem was actually with the dll "Microsoft.mshtml" which I need in order to handle with the Webbrowser control.
I can't really understand why this problem occurs. As far as I know the dll comes with .Net Framework or Windows.

Should I just Install the dll in my application folder?

Thanks Smile

stige  Saturday, December 08, 2007 5:10 PM

What version of .Net are you running? If you are using the .Net 2.0 web controlyou should only need .Net 2.0 installed. "Microsoft.mshtml" is an old reference to the Interop assmbly for the IE browser control I believe.I think that this file wasn't included in the .Net distributablepackages so it may not have been installed. I thinkit is usuallyintalled by MS Office or other PIA (Primary Interop Assemblies) applications Location installed:..\Program Files\Microsoft.Net\Primary Interop Assemblies\

Also, this Interop assembly was depricated in .Net 2.0. and will not work on a machine with .Net 2.0 unless you copy the file to the program directory. I would suggest that you upgrade the browser control to the new .Net 2.0 control.

Let me know what happends.

Joe

Joe Fairchild  Monday, December 10, 2007 4:49 PM

You can use google to search for other answers

Custom Search

More Threads

• Update Editbox from CustomAction
• How can folders be localized when users switch languages in MUI?
• Rebuild project does not clean project
• ClickOnce on a remote server without .net framework
• Setup file creation - Warnings
• VS2005 ClickOnce two versions of application on same client
• How to call APIs (that requires Admin privilege) from Standard User
• How to make it so an app installs for ALL users, not just the current one?
• Trouble with "InstallAllUsers".
• Individual Update-Info (Description) in UpdateCheckInfo()