3

I have a WPF C# desktop application that will need to be deployed as MSI (Windows Installer deployment, not ClickOnce deployment) in VS2010. My application will generate SQL CE database in run-time, manipulate Excel Workbook, and receive/transmit data from/to COM Port - so I don't know what is the appropriate way to deploy such an application.

I am looking at Windows Installer Deployment Tasks which doesn't help me to get started.

Could anyone show me some resources that give instructions on how to deploy an application as an MSI installer?

3 Answers 3

4

If you don't want ClickOnce, then you'll probably need to create your own MSI. In that case, you can use:

  1. The built-in Setup project type in Visual Studio. It does a decent job but has limitations. Works very well if you don't have many dependencies or custom actions.
  2. A commercial tool like InstallShield
  3. WIX (Windows Installer XML)

I've tried both 1 and 3. While WIX has a little bit of a learning curve, it is a very rich way to do what you want to do. There is a fair bit of documentation available and some very nice "out of the box" wizard sequences to handle your standard install scenarios (licenses, feature selection, dependencies, etc). WIX does have some VS integration that works quite well.

You can find out more on WIX at http://wix.sourceforge.net/

Note: The VS setup project can do custom actions, and install dependencies, but you have to use custom actions. If you want to parameterize the custom actions, then you'll need to find the not-so-intuitive instructions on that topic.

The other limitation of the VS setup project is that the setup project can only be compiled to an MSI by VS (devenv.exe). That means that the MSI cannot be compiled on a build server unless you install Visual Studio there too. This was a show stopper for me, so I switched to WIX and was very happy with the result.

Sign up to request clarification or add additional context in comments.

2 Comments

NathanAW: "cannot run on .... there too" - do you mean computer installing the application needs to install VS as well? So every user of the app needs to install Visual Studio? That doesn't make sense to me..
Sorry. just meant that you cannot compile the VS Setup project to an MSI unless you have VS installed. You can install the MSI anywhere, even if it doesn't have VS. Sorry about that.
2

For those like me who found this post after searching high and low for how to deploy an MSI these days, you now need an extension as the visual studio team removed the built in startup project functionality. You now need to download the Visual Studio Installer Projects extension.

See this user voice post for discussion of the removal, and here is a link to the extension.

Useful for people looking for a quick solution to generating an MSI through Visual Studio rather than getting deep into Wix (although if you need more advanced deployment options, definitely go that route).

Comments

1

Configure your WPF application to publish as a ClickOnce application. You can do that in the 'Publish' tab of the project properties.

If you use the 'Publish Wizard' (by clicking on the aptly named button on the properties page) you can specify (on the second page) that the user will install 'From a CD-ROM or DVD-ROM'. This option will produce a setup.exe file in the publish sub-folder of your project output directory. This setup.exe program when launched by your user will install the WPF application. You may choose to include an update functionality (but you don't have to).

The ClickOnce settings also allow you to include additional files (e.g., your SQL CE database file) and pre-requisites if necessary.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.