How to create an installer for a WinForm application using Setup Project

By | March 13, 2012

In this article I will explain the process of creating an installer for a Windows Form application using Setup Project


In this article we will create a Setup Project to build an installer of a Windows Application. We will create setup for Windows Application created in my last article.

Step 1:

Create a Setup Project as below and give a name

Step 2:

Add the Windows Forms Application project for which you want to create the installer. I will add the application created in my last article.

Choose: File -> Add -> Existing Project and select your project

Step 3:

Now File System editor is opened for you. If not the Choose View -> Editor -> File System

Now, you need to add output of your Windows Form Application to build the setup. Right click on Application Folder and select Add -> Project Output

Leave the default selection of Primary Output in the “Add Project Output Group” dialog box and click the OK button. This will add primary output of your with name “Primary output from MultiThreading_BackgroundWorker (Active)” on the right pane of the File System editor.

Step 3:

Right Click on the Primary output and select the first option to create a shortcut on the target machine.

Rename this short cut to “My App”. Repeat this process to create one more shortcut, one for Desktop and one for Programs Menu of the target machine. Drag one shortcut in the “User’s Desktop” folder and one in the “User’s Programs Menu” folder on the left pane of the File System editor.

You can display an icon for the shortcuts by specifying their Icon property.

Step 4:

Select Setup Project in the Solution Explorer and press F4 to view its properties. You should change following properties

Author Give your name as you are the author
Manufacture Application on the target machine will be installed under this value in the Program Files
RemovePreviousVersions Change it to True if you want to remove previous version of this application installed on the target machine
Version Give a version to your installer

Step 5:

Now we are ready to build our project. Just build the project and installers are ready in the debug folder of the Setup Project. There are two files one is Setup.exe and other is ProjectName.msi. Copy both files on the target machine and run any of the two to install the Windows Application on the target machine.

Note: As we have developed our application in .Net Framework 3.5, this framework needs to be installed on the target machine.

Step 5:

Run the installer on the target machine

0 thoughts on “How to create an installer for a WinForm application using Setup Project

  1. Radhika Jasti

    Nice Article. But I have some other files to be installed. So I have added them to the Application folder and tried to install. But it is not working.


      Have you add other files in the Application folder by right click on the application folder and selecting Add -> File

      Are you getting any errors


Leave a Reply

Your email address will not be published. Required fields are marked *