Generate the executable file that can run anywhere


Active member
Jun 15, 2004
Programming Experience

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.

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 with the username=charleschau2005, password=cpc123. Those files are under the directory GenerateExecute.

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.
2. you need a setup project for your application, which you can then export to the destination computer. Complete details are found in the section, under
How to create an Installer for Windows Applications
at the following site:
Hope this helps and happy programming.

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.