Visual Basic Application Deployment

Posted by in Appn Development

Yesterday I was debugging one of the visual basic application. The application had a database attached to it, what i thought was to deploy the whole application as an executable. I published the application but, it showed error that database file was missing. Then after Googling for some time. I found the solution, that if we want to deploy an application with certail external things attached. I need to first add those items in the project. I am listing out the steps which we need to do in order to deploy the application with databse or other external files.

  1.  First you need to add the existing items to your project, to do so
    1. Right click the project name
    2. click on the add existing item
    3. from the dialog box, select the database file, the database file must be in the root folder of project.
    4. Click on add this item
  2. After adding the database you need to make it to get packaged with the setup. to do so,
    1. Go to the project setting,
    2. In that there is one tab publish, open that,
    3. In the publish window, click on Application Files to open it.
    4. In the opened window, click on the database name and select include under Publish Status.
    5. Now Click Ok
    6. You can also setup application prerequisites for the application like .Net Framework etc.
  3. Now Save the setting and publish your project. And install on any other system.

Some features in Visual Studio are only supported for 32 bit Operating System (x86) architecture. This was also the one of the  problem which i faced when debugging the application because the application which i was debuggin was using OLEDB connection to the database, and that OLEDB driver was supported on 32 Bit OS only, so whenever i debugged, the application showed error that driver is not registered, to solve that what i did i was in the build configuration i selected x86 architecture. After that the application debugged very smoothly.

Enjoy Programming!!