Generate the executable file that can run anywhere

CharlieChau

Active member
Joined
Jun 15, 2004
Messages
26
Programming Experience
Beginner
Hi,

I use the VB .NET for create an application. It can in the visual studio .net no problem. Now, I want to take the executable file to run without opening visual studio .net.

I take the executable at the bin of that application and copy in root c: , but I always get the message error:"System.IO.FileNotFoundException" at the window Just-In-Time-Debugging.

How can I avoid the above error.

Thanks,
/CC.
 
Does the error message say which file is missing?

If you reference files in your app, you'll need to move them to the same directory as the executable.
 
I only used the OleDatabaseAdapter at the tools box to connect to the MS Access database. I do not reference to any other files.

Do I need to do anything to generate the executable file without debugging option if I using the visual studio .NET version academy. I use the default setting of the visual studio, I do not change anything since the software is installed.

You can login briefcase.yahoo.com with the username=charleschau2005, password=cpc123. Those files are under the directory GenerateExecute.

Thanks,
/CC.
 
It looks like that if you would like to run your application on a new computer, the following requirements must be met:
1. the new computer must have Microsoft Framework installed.
http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&displaylang=en
2. you need a setup project for your application, which you can then export to the destination computer. Complete details are found in the vb.net section, under
How to create an Installer for Windows Applications
at the following site:
http://www.mathpath.net
Hope this helps and happy programming.
 
Quickfix

You can try to just copy the whole bin-folder to the other computer. As long as the same version of the .Net Framework is installed you have a good chance that it will work.

I usually do this to test my programs on computers that run older versions of Windows. However, this is not a suitable way of deploying your applications and I would suggest that you study-up on how to create an installation file (like Paszt said).

Another thing: I see you said that you connect to a MS Access database by using "the OleDatabaseAdapter at the tools box". Remember that if you also used an auto-generated connection(string) the program will go and look for the database-file in the same directory everytime. Thus, you have to copy the file and its filepath must stay the same.
 
Back
Top