Saturday, January 11, 2014

How to Create setup for Window Application in Asp.Net

This example demonstrate the steps to create setup.exe in Visual studio 2010 with diagrams. In windows application to distribute the project to others for use without giving the source code you need to create setup file.
This example assumes that you have created your windows application and now want to create setup project. Before creating the setup build your window application whose setup you want to create.

Steps by steps process to Create Setup.exe for windows application project in Visual Studio 2010:

Step 1: Right click on solution of project whose setup you want to create and then select the option Add->New Project as shown in the picture below:
Add new project in vs 2010

Step 2: In Add New Project window select option Other Project Types, then expand the node Setup and Deployment and select the option Visual Studio Installer and on the right side select the option Setup Wizard .

Select the location where to save the setup project and specify name for the setup to be created as shown in the diagram below:
Add Setup Project in vs 2010

Step 3: Setup Project Wizard will get open click on Next as shown in diagram below:
Setup wizard in visual studio

Step 4: In the next window select the radio button Create a setup for a Windows Application and click on Next Button as shown in picture below:

create setup in windows application

Step 5: In Choose project outputs to include window select the checkbox Primary  output from webapp as show in picture below:
Primary output in windows setup

Step 6: In Choose file to Include window click on Add Button as  shown in diagram:
Include files in setup project

Step 7: Now select the application file of the project whose setup is to be created from the bin folder of the project as shown in diagram below. If you don't find the application file in the bin folder of the project it means you need to build your project first:

add application file to setup project

After adding the exe file from bin folder click on Next Button as shown in picture below:

create exe file in vs 2010

Step 8: Now in the last step just click on the Finish button as shown in the diagram below:

create setup in visual studio

Step 9: Now select the Application Folder in File Systems window and on the right side right click on exe  file and select the option create shortcut to 'setup file name' as shown below. Give name to shortcut to be created.

create shortcut in setup project

Step 10: Cut the Shortcut created in Step 9 as shown below:
Create shortcut to setup in windows application setup

Step 11: Select the User's  Desktop Folder and  then paste the shortcut file which you cut in the step 10 as shown in diagram below:

desktop shortcut in visual studio

Step 12: Right click on Project option in File Menu and then select Project Properties option as shown in the diagram below:

Properties in visual studio

Step 13: In Properties Page select the option Release in Configuration drop down as shown in picture below:

Project Release Mode

Step 14: Click on Configuration Manger in Property Page on the right side of the window as shown in diagram below:
configuration manager in vs 2010
Step 15: Select Release mode as shown in picture below and close this window:
Select Release mode for the project

Step 16: In the next step just right click on setup project and build the project as shown in diagram below:
create setup project in vs 2010

Finally open the location of setup project on your computer and open the Release folder inside which your setup file would be available as shown in the picture below:
Release mode in visual studio


  1. Thanks..Realy helpFull..!! Helps me A lot..!!

    plzzz also Give this type some examples for WPF.

  2. I have a windows application with database on SQL server
    how to create setup for it?
    I want to include the DB into the setup

  3. Amazing!! Thanks This Help Me Lot I Was Need It

  4. Helped a lot!
    Thank you!