Click to See Complete Forum and Search --> : run exe


gopala_kris
November 7th, 2006, 11:16 PM
Hi all,


I developed a one vb.net application , but iam not able to run exe of developed application independently......................


the exe is working fine when i execute the exe inside the bin directroy..............


if i execute the same exe from some other location by copying the exe ... it is giving just in time debugging error


plz help me regarding this



regards

Gopikris.

gigemboy
November 8th, 2006, 12:41 AM
Are you talking about the same computer? Try copying all the files in the bin directory to another location, not just the EXE. Other files are there that the program uses, like resource files, settings xml files, etc. Moreso in 2005, where there are many files created other than just the EXE that the program uses. Also will happen if you are referencing any dlls that are set to "copy local", which would not exist in the application directory when you just copy the EXE. And finally, if you are referring to some sort of directory or location inside of the application's normal directory (files or subfolders in the app directory), then you would have problems as well.

In short, it is not wise to just copy an EXE and expect it to run.. copy the entire directory, or create an actual setup project to install the program correctly.

Of course, explaining what error it gave you is a good start...

Craig Gemmill
November 8th, 2006, 12:45 AM
The actual error details would help, but I'm willing to bet that your problem is the result of a missing dependency. And it's probably in the form of a file or folder.

Does your program use any .dlls, images, folders, etc. that are referenced using a relative path? Look in the output folder where there is your .exe. Are there any other folder/files in there? They are probably depended upon and will need to be distributed with the .exe.

If you didn't specifically reference any external files, did you add any legacy controls to your program? This would in turn create an Interop .dll file that will be located in the same folder as the .exe, and is needed for your app to function properly.

Craig Gemmill
November 8th, 2006, 12:46 AM
Beat me to it. ;)

gopala_kris
November 9th, 2006, 12:18 AM
Thank u sir it is know working on the same PC.....now the problem is

When I tried to run the exe on different system by copying the bin directory it is giving the exception like this……

System.argument out of range exception as occured in the application.exe

Craig Gemmill
November 9th, 2006, 02:26 AM
- Look at the Stack Trace in the error message and then map that to your code.
- Determine what has changed between one location and another.

Again,
I'm willing to bet that your problem is the result of a missing dependency

gopala_kris
November 9th, 2006, 11:00 PM
Plz tell clearly iam very new to VB iam not an expert to bet with u.........