Visual Studio Publish Project Into One Simple Installer

The Ancients: If the below is TL;DR (too long, didn’t read), please skim these two links:


UPDATE: September 2018 – Since this “answer” was recently downvoted, let me try to add some more links to see if the intent of
the answer can be made more clear. Not to be overly dramatic, but:

As deployment specialists we have to warn people when they commit to using a tool that is bound to fall apart for them down the line when more advanced deployment requirements invariably surface.

The installer projects have several times been pulled back and then
re-introduced in Visual Studio
. Always based on the problems seen
with these project types (just the bigger ones):

1) No MSBuild support (not tested extensively by me, but by others), 2) only deferred mode custom actions running in system context (not insertable in GUI), 3) highly limited control overall (always advertised shortcuts, no ability to configure certain things, etc…), 4) no support for proper service installation – requires custom actions instead, 5) very few available prerequisites to bundle, 6) rudimentary GUI with little flexibility, 7) appears to not be possible to define MSI features (as in features and components), 8) problems with 32 / 64 bitness issues for custom actions, etc…

An old MSDN page on this project types and its problems: Troubleshooting Setup and Deployment Projects.

MSI Expert Chris Painter and others:

In my opinion the project type can only work for simple.NET applications. Any complexity of caliber and you are in trouble. SQL Scripts, IIS, proper COM / COM+, Users & Groups, Shares, Firewall Rules, Custom GUI, etc… Commercial tools and WiX have advanced support for these things. The internals of the compiled MSI files are also sub-standard (use of self-registration, custom actions for services, etc…). I often experience that the tool stops working for “some unknown reason” as well. Suddenly it won’t compile. Concrete Example (with fix).

Alternatives:

The open source WiX toolkit features a component called
Burn to create such setup.exe launchers / downloaders
/ bootstrappers – used to run several installations in sequence and /
or install prerequisites (a very common task – Visual Studio projects
only support a few prerequisites).

Writing WiX XML markup code is necessary to use this Burn feature.
Commercial tools Installshield and Advanced Installer
provide GUI-features to build such setup.exe files.


The Visual Studio installer is very limited, I never use it. WiX (link to an answer trying to provide some links for a WiX crash course) is a full blown, open source deployment solution. It will take you a while to master, but it is very good and flexible. A commercial solution such as Installshield or Advanced Installer will allow you to deliver a setup faster and easier, but they can be very pricey.

Given the limitations of Visual Studio Installer projects (and bugs), I do believe the right solution is to use a different tool:
What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc. If you need anything advanced at all, you will struggle otherwise. With a more advanced tool it is at least possible to do what you need, even if it might be more involved at times.

Let me know what you want to know about such a process, and I will try to help. I am not sure what software you are delivering, what the target user group is, what budget you have, etc… Windows Installer is highly desirable for a number of corporate benefits, but other deployment technologies exist (see the description above of various tools to use).

Leave a Comment