This is the most important tutorial for creating the Setup File(.exe file) from windows forms application.You can easily install it any windows computers.You can use it only windows platform.
In previous tutorial i have shown "How insert data is database and print the grid-view data in windows forms application"
Now i am going to convert these windows forms application to the Setup File. Friends who have not read my previous tutorials please read first this tutorial and download it, otherwise you will not understand correctly.For read the previous tutorial .
There are some steps to create Setup File From windows forms applications. please follow these steps carefully.
Step1:- First open your windows form application in your visual studio.Here i am using visual studio 2010 and my windows forms application Name is "test",which had made in previous tutorial.you can download it Click download.
Now i am going to open "test" application in visual studio 2010,my "test" application is on desktop. See it carefully and open your application together.
Step2:- Now open "test" application in visual studio 2010,which is given below, follow it. Open visual studio 2010->File->Open project/solution->select the application "test"Folder_> click open.
Step3:- First see Form1.cs,Form2.cs and Solution Explorer window for remember previous post.
Step4:-> Now open solution explorer(if not open)->Add New Item->Select Application Configuration File->Click Add
See App.Config File:-It is used for creating connection to the database. It is optional.
Step5:- First create table in database,here i am already created "RAM"table in previous tutorial.See it:
- write the connection string for creating the connection database table "RAM" in app.Config file.if You want to create otherwise escape it
Step6:- Now this is main step to create the step. Open Solution Explorer->Click on 'solution'test'('project)->Add New Project->Select other project types from left window->Select visual studio Installer->Select the setup Wizard-> write your setup name in below(mysetup)->click OK.
- One wizard will be opened->click 'Next' Button.
- Select Radio button "Create a setup for a windows application" ->Click Next.
- Select "Primary output from text"-> Click Next.
- Click Add Button->go your application folder,which you want to create setup.
- Select the "App"File from your project ("test")-> click Open Button.
- Now click Next Button.
- Click Finish Button.
- Now click Application Folder From left side window.
- Go right side window-> Right mouse click ->Add file->select icon file (extension . icon) , This icon will show on Your desktop when you install the setup on computer.
- Now create shortcut file of "Primary Output File" by l Right mouse click on Primary Output File.
- Now change shortcut folder, here i have changed 'mysetup'.
- Now Right mouse click on ' mysetup' Shortcut and go property window.
- Click Icon and select browse.
- Click Browse Button.
- Click Application Folder and select "mysetup"Icon file->click OK.
- Again select icon file and click OK button.
- Drag and drop 'mysetup shortcut' User's Desktop (left side window).
- Now again create shortcut primary output->rename it again mysetup -> again add icon File from the mysetup property window as before we have added.
- Now Add New Folder in "User's program menu"(left side window) and change Name it as setup->Now again Drag and Drop mysetup shortcut to the setup.
- Now go "Solution Explorer window"-> Right mouse click on mysetup->Click Build. wait some time whenever setup is not successfully build-> Your setup is build successfully->Go and open your application Folder("test").
- click mysetup:-
- ->Click Debug Folder.
Step8:- Before installing the setup you First install .NET FRAMEWORK 4.0 on your system,Click here for download . whenever you install this setup on your window (OS) and open it then you will see like this:-
Note:-I have seen that many student face problems.Read below link.
Step9:-If you want you can create setup file in visual studio 2012 and visual studio 2013 also.
- Print the Grid Data in Windows Forms Application
- How to build real form filling application in asp.net like IBPS
- Create .dll File and Use in Asp.net Application
- Take Print receipt in Windows Form Application
- File Handling Real Application
- Create Setup File(.exe) with SQL Database(.mdf)
- How to implement WCF Services in asp.net application
- How to implement form based authentication in asp.net
- How to implement caching concepts in asp.net application
- How to implement cookie in asp.net application
- Transaction in sql server
- Web Form control in asp.net
- Operator over loading in c#
- Multithreading in c#
- How to implement session state in asp.net application
Please share this with your friends ,its may be helpful for them.
To Get the Latest Free Updates Subscribe
Download Attached whole setup file:-