how to make .exe from Solution ???

mkhurram92

Member
Joined
May 27, 2011
Messages
16
Location
Jeddah(KSA)
Programming Experience
1-3
hi all there..
i m very new in vb.net so sorry but i have to know about it...

i have completed a project in my Laptop using Forms with SQL Server Database.
How i will implement it on the client PCs now... ??

how i can make .exe of this solution and how Database will be connected now ???

Please Guide
 
Hi this is a problem I am asking about at the moment but, You can't just make an exe like you could do in the days of DOS or using the C language. You need to create a set of instalation files. This could be used on a setup CD. What I have done so far but am still having problems with is this. O n the main top menu.

File -> Add -> New Project
Other Project types
Setup and Deployment -> Setup wizard
1) (.) Create a setup for a windows application
2) I left leave the 7 tick boxes as I don't understand these and they look like additional stuff
3) No additional stuff needed.
4) Summary
Project type: Create a setup for a Windows application
Project groups to include: (none)
Additional files: (none)
Project Directory: D:\Lottery\DotNet\Lotto1\Setup1\Setup1.vdproj
Now have a second project Setup1. I know I should have named it something else to start with.
Have a new folder Setup1 with two folders
Debug (empty)
Release (empty)
If you have not given the project a name it will default to Setup 1
I beleive you have to right click on this and build it. This should create a set of files in the debug or release folder.
This works. It installs for me but there is nothing on the hard disk.
I do have an item in programs and features to un-install it however.
 
If you just want an exe file, you can simply change the compile configuration to Release and then go to Build > Build YOURAPPNAME and it will build the exe along with other resource, document files and so forth. These files are stored in your bin folder. If you right click on the project in your solution explorer there should be an option that says "Open Folder in Windows Explorer" click that and then navigate to your bin folder. There should be a Debug and Release folder inside.

Each time you debug and run using VS.net you are actually creating an exe in that debug folder as well. So you can actually just go to that bin folder and take that exe if you wanted to.

you do not need to use the setup wizard if you just want a exe file. Unless you want to create desktop shortcuts, and so forth you really dont need to use the setupwizard.

Alternatively you can also use the publish option that is under the Build menu to create a quick setup file for that project. If you copy the exe file from your bin/debug or bin/release, it should work fine unless you have some dlls or such that are referenced separately or improperly.



you can check out these links. similar questions have been asked elsewhere, it may help. How can i make a .exe in vb.net - VB.NET
HOW TO: Run an Executable File During a Windows Installer Installation by Using Visual Studio .NET
How to create EXE file using vb.net
 
Debug / Release

I have also been asking this question. I have searched the web and even Microsoft I can't find a configuration for debug/release in VS2008
 
Let Me Guide U Please
Open VS2008
Click On Menu "Build--> Public Project(Where Project is Ur Project Name)
It will ask u to publish the project and will ask the path where u want to put it.. Give the path and let VS2008 do its work.
After Msg u will see the Setup file on the path u defined.. Copy all the file from here that now created to anywhere else and run this Setup file to start installation...

take care
 
No this is not correct. I do nut have [Public Project] under the build menu. I do have a sub menu Publish Lotto1 I will use this.

Change destination to D:\Lottery\DotNet\Lotto1\Lotto1\publish
(.) From cd/dvd
Application will not check for updates

The application will be published to:
file:///D:/Lottery/DotNet/Lotto1/Lotto1/publish/
When this application is installed on the client machine, a shortcut will be added to the Start Menu, and the application can be uninstalled via Add/Remove Programs.

Error
Could not open file
Check that the address is spelled correctly, or try searching for the site.
Search with Google
file://localhost/D:/Lottery/DotNet/Lotto1/Lotto1/publish%22

what is this file location file://localhost/ Never asked for this.

Part 2
I have files in D:\Lottery\DotNet\Lotto1\Lotto1\publish
Application Files
Lotto1.application
setup.exe

You sugest I copie these files and use them but. If I double click on setup.exe I get....
This program might not have installed correctly. Also the application runs.

The who point of this as sugested at the start of the publishing wizard.
Option (.) From cd/dvd. This means I want a full setup CD. running setup1 in publish does not do this. I want a proper FULL package and deployment. like all windows software including microsoft. And I still want to know what this error is
file:///
 
Error
Could not open file
Check that the address is spelled correctly, or try searching for the site.
Search with Google
file://localhost/D:/Lottery/DotNet/Lotto1/Lotto1/publish%22

what is this file location file://localhost/ Never asked for this.

I don't know why but VS assumed that you installed it on a website so it tried to open that location using your web browser. I believe that is where you got this error, in your webbrowser correct? You can ignore this, VS was just trying to open the location for you and it failed. Probably a small bug?

[edit!]yea i think it is a bug, in VS2010 it opens it correctly in the Windows Explorer and web broswer if it was intended for the web.

If I double click on setup.exe I get....
This program might not have installed correctly. Also the application runs.

The who point of this as sugested at the start of the publishing wizard.
Option (.) From cd/dvd. This means I want a full setup CD. running setup1 in publish does not do this. I want a proper FULL package and deployment. like all windows software including microsoft. And I still want to know what this error is
file:///

the reason why you are getting the "This program might not have installed correctly. Also the application runs." is because you are likely running windows 7 or vista. If you right click on the setup and use program compatibility it will apply the setting of using "Windows XP (SP2)" and if you start the program using those settings you will not get that message. Although even if you don't do this i think it installs just fine. You can just ignore the message or click "This program installed correctly". You should still have a shortcut in your start menu and you should be able to uninstall it from your control panel.

I believe VS 2008 is making the setup package for XP, i've been using VS 2010 ever since it came out and the setup files it creates work perfect for windows 7.


Maybe someone else on here knows how to configure VS2008 so that it installs it correctly for Win7 and so forth. But the setup files you are making should work fine, that compatibility message can be ignored.

hope that helps..
 
Last edited:
I still want to know what this error is
file:///


that is not an error. if you type file:///C:\ it will open up the location and browse it. Your web browser just simply doesn't know how to handle it. If you use the latest version of FireFox, typing "file:///C:\" or "file:///C:/" in the address bar will navigate you to your c directory in the web browser instead of using the windows explorer.

Also if you use IE, i dont think i have the newest version but it opens up the Windows Explorer instead.

Your browser was probably unable to navigate to it because VS added localhost by mistake. localhost will only work if you have IIS installed and set up, but even then it will navigate only to that root folder.
 
This is confusing as I am getting replies to too difrent aproches
1) publish this is the one that gives me the error file///
The second is creating a package and deployment which is what I want

Still can't understand if I want to create a package and deployment using
File -> Add -> New Project
Other Project types
Setup and Deployment -> Setup wizard
checking the option for Create a setup for a windows application
Ignore the next screen Which project output groups do you want to include

If I right click on setup1 and build I end up with two folders and a file
Debug
Release
setup1.vdproj

Inside the Release I have
Setup1.msi
setup.exe

Double click Setup.exe launches the setup.
I can change the destination of the instalation
I eventualy get the Instalation complete dialog box

The application does not exsist on my HDD
There is no desk top Icon
THERE IS in `programs and features` an item for removing this NON EXSISTING applicatiom

This must be a bug. No error is given
 
Thanks to http://appdeveloper.intel.com/en-us/node/733
for this information. Aparently you have to ...
Right click on your Setup and Deployment project in the Solution Explorer and choose View -> File System. Right click on the Application Folder node and choose Add -> Project Output. Choose Primary Output, this will include your .exe.
Why would anyone not want the aplication installed in a package and deployment?
I have added a desk top Icon
1) I get a woarning Warning
File 'Desmond.ico' should not be installed into a User's Profile folder because it may not be available to all users. D:\Lottery\DotNet\Lotto1\Desmond\Desmond.vdproj Desmond
This is not a problem but it would be nice if I did not receive even warnings
2) The desktop icon text says
Primary output from Lotto1 (Release Any CPU). It would be nice if it just said Lotto1
 
Why would anyone not want the aplication installed in a package and deployment?

you do not always need a setup package with shortcuts, for instance i tend to program alot and i write alot of small console apps that are more like utilities so i just create a exe and use that. For example i have a small console app that opens any file in its current running directory by random, so i just copy and paste that exe into whatever folder i want. (in-case your wondering, i use this app to open video files at random) Of course there is a better way to achieve this, but for something fast without a GUI, it works fine.

Sometimes you may just want to distribute a standalone exe which can be easier than having the user use a setup wizard. However as you know in .net, you are going to need the .NET framework installed so its not exactly stand-alone.

There are numerous reason why someone might not want the application installed in a package and deployment.



2) The desktop icon text says
Primary output from Lotto1 (Release Any CPU). It would be nice if it just said Lotto1

When you create your shortcut by first going to the "User's Desktop" in the Users File System in your Setup Project you right click and select "Create New Shortcut".

You should get a quick browser, and you have to then select the primary output from the application folder or where ever you decided to put that.

It creates a shortcut and it's named something like "Shortcut to Primary output from tetsg (Active)" Simply right click on that shortcut and go to rename. That's it, once you install it on the users system it will be named whatever you name the shortcut.



Look for some more tutorials or articles on using the Setup project, there are alot of other things you can edit like if you opened the User Inferface you can modify the setup dialogs and so forth, Registry editor, and even the custom actions editor which can run a custom class or exe during a phase of the setup or uninstall. (there should be shortcuts in the solution explorer for these next to the filesystem shortcut) Be sure to turn off the installerclass for the custom action if it does is not a installerClass though.
 
Thanks for all this help. I finaly got there. But I thought it strange that I had to go into the file system -> application folder to select the app. Otherwise It goes through the instalation without actualy installing. Thanks again. My next problem (for a very future date is ) If the PC does not have the framework on it. Lots of software out there goes through this soI might need support at a later date. Thanks Desmond.
 
Back
Top