VS2012+, Setup Projects, InstallShield, and WiX

As you might have noticed, Visual Studio 2012 and later now no longer ship with a Setup Project (or MSI) project template. That is, if you create a Windows-based application, you can’t create a setup project for it. Instead, you have two free options:

InstallShield Limited Edition:
Within Visual Studio 2012 or greater, if you create a new project – and navigate into the Other Project Types – you’ll see the option for InstallShield.

image

You can create a new project of this type which simply makes a link available to:

http://learn.flexerasoftware.com/content/IS-EVAL-InstallShield-Limited-Edition-Visual-Studio

From there, you need to put in your information and click Submit. On the next page, it gives you a download link, and your personalized serial number. After you install this, you can now create a new setup project from within Visual Studio:

image

 

image

image

image

The result is probably what you expect, it’s pretty full-featured for what most people would want or need. You can:

  • Copy files into any folder, including installing assemblies in the GAC
  • Set registry entries
  • Handle 32-bit vs 64-bit installation configurations

image

 

Windows Installer XML (WiX):
WiX is an open-source  project, which doesn’t require a license or activation. It gives you the ability to configure every aspect of an MSI installer – but you do almost all of it from an XML file.

Download the tool and Visual Studio project template from: http://wixtoolset.org/

Download the ISWiX helper tool, which gives you a user interface to work in, as opposed to typing out XML: http://iswix.codeplex.com/

If you simply do this, and then re-launch Visual Studio, you’ll see some new templates:

image

Regardless of whether you use the IsWiX helper or if you do it via XML, you need to “Add Reference” from your setup project (or merge module) to the Windows application that you want to install:

image

Then, in code you can just do something like this:

image

Compile this and run it, and you have yourself a basic setup:

image

Posted in New Technology, Uncategorized, Visual Studio, Windows, WinForms
One comment on “VS2012+, Setup Projects, InstallShield, and WiX
  1. […] As previously discussed, Visual Studio 2012 and later no longer include any sort of MSI/Installer/Setup project template. That means if you create a WinForms, command-line, or Windows Service type of application, there is no way to create an installer for it out-of-the-box. […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 5 other followers

%d bloggers like this: