Visual Basic Application Deployment
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.
- First you need to add the existing items to your project, to do so
- Right click the project name
- click on the add existing item
- from the dialog box, select the database file, the database file must be in the root folder of project.
- Click on add this item
- After adding the database you need to make it to get packaged with the setup. to do so,
- Go to the project setting,
- In that there is one tab publish, open that,
- In the publish window, click on Application Files to open it.
- In the opened window, click on the database name and select include under Publish Status.
- Now Click Ok
- You can also setup application prerequisites for the application like .Net Framework etc.
- 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.