Wrap C# application in .msi installer

10,240

Solution 1

or very expensive (e.g. Advanced Installer).

There is a also a free edition which includes a Visual Studio extension for Advanced Installer, which you can use to build MSI packages.

The following tutorial shows how you can use the features from the free edition ("Simple" project type):

P.S. I work on the team building Advanced Installer.

Solution 2

At one point, Microsoft did remove the "Visual Studio Installer Project" support from Visual Studio1. And then they later relented and added support back. I can't remember which versions didn't have support, I think it was 2012 and 2013.

These days (for VS2017), to get the Visual Studio Installer Project support, you add it from the marketplace:

This extension provides the same functionality that currently exists in Visual Studio 2015 for Visual Studio Installer projects. To use this extension, you can either open the Extensions and Updates dialog, select the online node, and search for "Visual Studio Installer Projects Extension," or you can download directly from this page.

Personally, however, I'd go with WIX. It does have a learning curve but I think it's learning worth doing.


1For what I personally see as very good reasons. You had to have a full-blown install of Visual Studio to make them work, they didn't really integrate with MSBuild, which makes them a pain if/when you want to move to automating your builds.

Solution 3

VS Installer Projects: Several good answers already - worth trying out. As stated by others you can use Microsoft Visual Studio 2017 Installer Projects - as limited as they are (bullet list form). They feature some pre-requisite functionality as I recall. I have limited experience with the tool. Could work for something very simple, but you will quickly discover limitations.

WiX: Personally I would use WiX since it is also free and flexible - it takes some effort, but is very capable. Here is a WiX quick start tip answer (frankly not my favorite answer, but it has been upvoted more than usual and updated frequently - hopefully it still has its essence of helpfulness).

IsWiX: There is also IsWix - a GUI tool to help create WiX setups (Chris Painter's work). His WiX tutorials and a quick youtube demo.

Et Al: The commercial tools (Installshield, Advanced Installer (see Bogdan's answer in this "thread"), PACE Suite, etc...) are also good - your time costs too. Can be shocking once you add it up - and you will definitely get running quicker with a commercial tool. How to create windows installer (links to pretty comprehensive lists of tools and some MSI information). Further links below.


Other than that, I'll just link to a few pre-existing answers with info about various tools:

Share:
10,240
Boris
Author by

Boris

Updated on June 04, 2022

Comments

  • Boris
    Boris almost 2 years

    I have created a C# application in Visual Studio 2017. Now I would like to distribute my application as a single windows installer file. I was hoping for a simple one-click solution (select all the files I want to include -> voila! there's the installer). But it seems to be not that easy :-(

    I often read that Visual Studio supports setup projects. But that does not seem to be the case anymore, right?

    Third party tools are either very complicated (e.g. Wix, Inno Setup) or very expensive (e.g. Advanced Installer).

    Is there really no simple way to wrap some files in an .msi Windows installer? Does Microsoft provide no tooling to create such installers?

  • Boris
    Boris almost 6 years
    @Bodgan: Nice tool, works fine. If only I could change the image/logo in the free version ;-)
  • Bogdan Mitrache
    Bogdan Mitrache almost 6 years
    You can change the logo that appears in Control Panel (list of installed apps). Just open the project directly in Advanced Installer, not the VS extension, and change it from Product Details page.
  • Christopher Painter
    Christopher Painter almost 6 years
    IsWiX has project templates and graphical designers to greatly reduce the amount of time it takes to create a basic installer. It's also designed to not limit the full power of the underlying WiX when you choose to learn it. For example you can easily change the image logo by coding into your setup project in solution explorer, open the resources folder and update the graphics files.
  • jjxtra
    jjxtra about 2 years
    Iswix 404… :( …
  • Bogdan Mitrache
    Bogdan Mitrache about 2 years
    @jixtra check this link github.com/iswix-llc/iswix