Create a WPF Application

DZone 's Guide to

Create a WPF Application

In this post, we take a quick look at how to create and setup a WPF application using Visual Studio. So, if VS is your preferred editor, this post if for you!

· Web Dev Zone ·
Free Resource


In this article, we will see how we can create and set up a WPF Application.


  • Visual Studio 2015

  • Microsoft Visual Studio 2015 Installer Projects, which be download here.

Setting Up a WPF Project

Start by creating a new WPF project. You’ll learn more by going through the steps yourself.

Choose the WPF Application project under Visual C# in the New Project dialog.

Image title

Setting Up a Setup Project

After this is done, add a new Setup Project under Visual Studio Installer in the New Project dialog.

Image title

Now we will add the project's primary output into the Setup Project. To do so, go through the following steps: Setup Project-->Right Click--> View--> File System.

All applications need to copy one or more files onto the target computer.

Visual Studio's .NET Setup Project File System view lets you choose which files will be installed and where they will be stored (and found) in the File System view in a normal Setup project.

Application Folder

This is your Destination folder where you're going to install or copy the entire application (config file, icon, .exe), so you can add all your project files here.

  • Application Folder-->Add-->PrimaryOutput.

Image title

Image title

  • AlwaysCreate = True

Image title

User’s Desktop

This folder is your desktop, you can put a shortcut to the application file here.

Now create a desktop shortcut.

Primary Output-->Right Click-->Create Shortcut to Primary output from WpfApplication.Image title


  • Format - .ico

  • Size - 50px, 50px

Now set a shortcut icon.

After creating a shortcut, go to the properties. we have many options, including an icon. Now pick an icon from the local system and set it.

Image title

User’s Program Menus

This folder is about your start menu. You can put a shortcut to the application file here.

Setup Properties

  1. AddRemoveProgramsIcon - To set an icon to uninstall the program icon.

  2. Author - Set Author Name.

  3. Manufacturer - Set Company Name.

  4. ProductName - Set Product Name.

  5. Target Platform - Choose your Target Platform (x86 or x64)

Image title

Setup Prerequisites

When we develop an application using any platform, we should prepare our application to be deployed properly.

Now, I will explain how to add the framework to be installed before our application installation process.

Select the .NET Framework 4.5 tick box after selecting 'Create setup program to install prerequisite components.'

Image title


The final step. Rebuild your setup project.

Image title

Image title


I hope this has helped you to better understand how to create an MSI setup in WPF.

msi ,wpf application ,web dev

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}