Hi All,

I have just completed my project in VB 2008 express edition. Now I want the project to be converted to .EXE so that I can deploy it on other computer / laptop.

Could any one please help....


Regards,
Ashwin

Hi All,

I have just completed my project in VB 2008 express edition. Now I want the project to be converted to .EXE so that I can deploy it on other computer / laptop.

Could any one please help....


Regards,
Ashwin

Hi Ashwin,

First you need to go to the build menu option and build your project.

Then you need to right click your solution and select properties, in there at the bottom you find the tab PUBLISH, from there you can either run the PUBLISH WIZRARD or PUBLISH NOW and that will create the setup file where you can install it on any computer. (that runs windows)

It may be worth you reading up on this, there is a youtube video available, but there are settings you can change from the properties window for your solution.

Whichever you choose to use either PUBLISH WIZARD or PUBLISH NOW you need to put a destination for the setup file so you know where to find it.

You could also go to the release folder of your project which is usually kept in MyDocuments/VB08/Projects/.../BinRelease/... in there you will find the .exe file for you project.

Cheers

John

Edited 5 Years Ago by discovery-power: n/a

option 2 is you can go to your project property and choose the last tab where it says publish and then you can choose either to run a wizard or to folllow steps

Hi John,

Thank you for the reply.. I used the Publish method to create a setup file of my project. But I have another problem. When I try to install it in the other computer which does not have VB installed, it does not execute. It gives an error message something like files missing....
i am actually trying to create a set / installation file so that I can run and install my project / software on other computers ....

Hi John,

Thank you for the reply.. I used the Publish method to create a setup file of my project. But I have another problem. When I try to install it in the other computer which does not have VB installed, it does not execute. It gives an error message something like files missing....
i am actually trying to create a set / installation file so that I can run and install my project / software on other computers ....

Hi Ashwin,

Im not sure why you cant run the program, all the publish wizard does is collect all your project files and compile them into a .exe, it also craetes the setup file, which you can either save on a server so other computers can download it or save to some kind of media (cd, dvd, data stick).

TRY THIS

Go back into properties, click on the COMPILE tab, then click on ADVANCED COMPILER SETTINGS, make sure that the TARGET CPU is set to ANY CPU and TARGET FRAMEWORK is set to .NET FRAMEWORK 3.5

Going through all the options I can see in VS2008 I cant see any other reason why your build shouldnt work.

What I will suggest is try the build / publish again and if you still get the error message, write down exactly what it says and post it back on here, if you cant publish the same project twice (I have never tried) then as before post the error and we will take it from there.

Cheers

John

Hi John,

Thank you for the reply.. I used the Publish method to create a setup file of my project. But I have another problem. When I try to install it in the other computer which does not have VB installed, it does not execute. It gives an error message something like files missing....
i am actually trying to create a set / installation file so that I can run and install my project / software on other computers ....

Hi,

When you want to instal your program to a Pc that doesn't have VB then you need to instal the .Net Framework on that PC.
What you can do is:

1 With a project selected in Solution Explorer, on the Project menu click Properties.

2 Select the Publish pane.

3 Click the Prerequisites button to open the Prerequisites dialog box.

4 In the Prerequisites dialog box, make sure that the Create setup program to install prerequisite components check box is selected.

5 In the Specify the install location for prerequisites section, select Download prerequisites from the following location.

6 Select a location from the drop-down list, or enter a URL, file path, or FTP location, and then click OK.

Secondly, during the publishing wizard you need to Add all the files needed for your program to work porperly on the other PC's.

Edited 5 Years Ago by Luc001: n/a

Hi Guys,

Thank you for the reply but I am still not able to create a setup for my project. When I try to use publish wizard i get the below errors ... In pre requisites I have given the following url
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en

Error 1 Cannot publish because a project failed to build. Lead_Management_Project

Error 2 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX\instmsia.exe' in item '.NET Framework 2.0 (x86)' can not be located on disk. See Help for more information. Lead_Management_Project

Error 3 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX\WindowsInstaller-KB893803-v2-x86.exe' in item '.NET Framework 2.0 (x86)' can not be located on disk. See Help for more information. Lead_Management_Project

Error 4 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX\dotnetfx.exe' in item '.NET Framework 2.0 (x86)' can not be located on disk. See Help for more information. Lead_Management_Project

Please give me step by step solution for vb 2008 express edition ...

Hi Guys,

Thank you for the reply but I am still not able to create a setup for my project. When I try to use publish wizard i get the below errors ... In pre requisites I have given the following url
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en

Error 1 Cannot publish because a project failed to build. Lead_Management_Project

Error 2 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX\instmsia.exe' in item '.NET Framework 2.0 (x86)' can not be located on disk. See Help for more information. Lead_Management_Project

Error 3 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX\WindowsInstaller-KB893803-v2-x86.exe' in item '.NET Framework 2.0 (x86)' can not be located on disk. See Help for more information. Lead_Management_Project

Error 4 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX\dotnetfx.exe' in item '.NET Framework 2.0 (x86)' can not be located on disk. See Help for more information. Lead_Management_Project

Please give me step by step solution for vb 2008 express edition ...

Hi Ashwin,

Ok, lets get some info on what your using to build and publish your program, what version of Visual Studio or Visual Basic are you using (2006 / 2008).

Lets say your using Visual Basic 2008 express

I am going to tell you what I use in my prerequisites, I was going to mention it last night but I thought you might have left them at default, here is what I use to publish my programs and as daft as it sounds this is what could be causing your problems.

I have selected

Windows Installer 3.1

.NET Framework 3.5

and thats it

Now most computers that run the latest Windows operating system (Vista, Win7) run with the .NET Framework 3.5 as standard, so if its a standard PC installing your software this should work.

NOW lets do some research on your errors.

Error 1. did you get any errors when you originally published your program

Error 2. it seems that all the errors are based around the fact that you are trying to create your setup file to run from a website. Do you want to run your set up from a media like a CD, DVD, DATA STICK or are you wanting the program downloadable from a website.

Lets say you want your program to be deployed from a Media source, this is what I would do.

Project Properties

Compile Tab: bin/release

Security Tab: have clickonce security settings selected and decide weather you want the end user to have partial or full trust settings, read through these and decide for yourself which to select

Publish Tab: select a location for the setup file, I use my projects folder in the VB2008 folder = Install Mode and Settings = select the app is available offline as well (launchable from start menu)

these are the options I choose, I will do some more research but this should give you a start.

Let me know how you get on.

Cheers

John

HI John,

Thank you fir the reply... I followed the steps you suggested...

I have selected

Windows Installer 3.1

.NET Framework 3.5

IN prerequisite " Specify the install location for prerequisite
I selected " Download prerequisite from the components vendor's website" since other options gives me error while publishing... this time the publish was successful.
But when I try to install the set up on another system the following error messgae is displayed
" Unable to install or run the application. The application requires that assembly Microsoft VisualBasic.PowerPacks.Vs Version 9.0.0.0 be installed in the Global Cache (GAC) first. Please contact your system administrator. "

Please try your best to solve this...

regards,
Ashwin

HI John,

Thank you fir the reply... I followed the steps you suggested...

I have selected

Windows Installer 3.1

.NET Framework 3.5

IN prerequisite " Specify the install location for prerequisite
I selected " Download prerequisite from the components vendor's website" since other options gives me error while publishing... this time the publish was successful.
But when I try to install the set up on another system the following error messgae is displayed
" Unable to install or run the application. The application requires that assembly Microsoft VisualBasic.PowerPacks.Vs Version 9.0.0.0 be installed in the Global Cache (GAC) first. Please contact your system administrator. "

Please try your best to solve this...

regards,
Ashwin

Hi Ashwin,

I have done some research and there are two ways you can fix the problem, either of these should work.

1. Open the Properties page of your project.

2. click the References page.

3. Check the path of Microsoft.visualBasic.powerPacks.Vs.. In my case the path is:

C:\Program Files\Common Files\microsoft shared\Visual Basic Power Packs\1.1

4. Go to that folder you will find 2 files.

Microsoft.VisualBasic.PowerPacks.Vs.dll

Microsoft.VisualBasic.PowerPacks.Vs.xml

5. Copy these 2 files to the floder that you want to run your program at your friends PC

Do me a favour though, make a BACK-UP of your program before you start deleting things from your refernces.

Or you can

Go to project properties

click on publish tab

application files

select show all files, from there you can choose to include or exclude certain files, I did it on my own program and all I have showing is (the program is called noughts and crosses)

noughtsandcrosses.exe
noughtsandcrosses.exe.manifest
noughtsandcrosses.pdb
noughtsandcrosses.xml

If you have any files in there for VisualBasic PowerPacks then I would try excluding them.

Hope this helps chief

Let me know how you get on

John

Hi ashwin
i tried all the steps that u mention for creating a set up files
but when ever i try to run set up file on ther machine , i m getting the error messege like
missing required files

hi john
the revious post for u
i m gettignn the error msg like cannot download the application. the application is missing required files .
when i click the details then it shows the erro list like
could not find a part of the file.exe.manifest

Hai Friends,

I would like to know that the files that is compiled in vb 2008.
where it will be istall in the client computer.

Hello ashwinshenoy,
What you can do is download a program called "Inno Setup" then you'll just need to gather all the information you want, such as your program files.

As an example in Visual Basic 2008 make it so when you build your project send it the "Release" folder located in the "bin" folder (Eg. Example Name\Example Name\bin\Release).

Then what you can do is just get copy every file except for these (example): "Example Name.exe.config", "Example Name.pdb", "Example Name.vshost.exe", "Example Name.vshost.exe.config", "Example Name.vshost.exe.manifest" and "Example Name.xml".
So just copy the remaining files to a sepret folder located where ever you want. Launch Inno Setup and just follow the Wizard Guide and just so the user will know to install the .NET framework create a text file containing program details such as requirements to run the program.

So include that they will need to install the framework. First off make sure you will need to check what .NET framework you program is running. To do that goto the "Solution Explorer" and double-click "My Project" on the side make sure the "Application" tab is selected and there sould be a spot that says "Target framework:" that is the framework you will need to tell the user to install (In my case mine says ".NET Framework 4.5").

This article has been dead for over six months. Start a new discussion instead.