I’m developing an open source C# application. For awhile now, I’ve been using a basic .NET installer I coded myself. However, with a recent change, that is no longer practical for me, as I’d have to add a large number of files to the installer – and they may change with each release. A ZIP file is also not practical.
I’ve done some checking online, I see a lot of MSI, ClickOnce, Self-extracting ZIPs, and (imo the most promising) the NSIS system. None of them seem to exactly fit my needs, so I’m looking for advice on which system to use.
Actual installing of my program is very simple. Basically, I just need to copy the bin\Release directory (and all subdirs) to the client’s computer. I’ve been achieving this somewhat ad-hoc, by embedding every file in my .NET installer, and maintaining a file table of what goes where.
Unfortunately, I just localized my app. I now have 30+ .resx files (Which are compiled to dlls and placed into MORE subdirectories by Visual Studio) and, obviously, it’s impractical to add 30+ folders and DLLs to my installer. Hence why I’m on this search.
There’s also a few other requirements:
- The installer should search predefined directories for a specified .exe. (My app is designed to be a drop in replacement) If the .exe is not found, it should prompt for its location
- The installer should verify that “OldApp.exe.bak” exists. If not, it should rename “OldApp.exe” to “OldApp.exe.bak”
- The installer should update files. Ie, if “Culture.de.dll” hasn’t changed, the installer will leave it alone.
- The installer should work with all Windows versions of all .NET IDEs (VS, SharpDevelop, Mono, ect) but does not need to work on other platforms.
- When I build the solution, the installer should be automatically regenerated. In other words, it should be run-able for by “Post-build” section.
- The installer generation must be able to be added to a source code repo. This is so that anyone who downloads the source of my app can compile the installer as well.
Sorry for the long post, I figured it was better to post more than less.
I’d recommend SharpSetup. It combines WiX and C# for a pretty flexible implementation. Not much I’ve found it can’t accomplish.