Using WiX to create an installer for an ASP.Net MVC website

Has anyone used WiX to create an installer for the ASP.Net MVC website? Are you collecting files from a web project? I can not find good examples of this. It seems that this is not a documented way to include all the correct files, only the correct files and their placement in the right place.

If you add a website project as a link in the installer project and set harvest=True in the properties, then all the website files are captured, but there are problems:

  • Some files that should not be backed up are included, for example. packages.config , Web.Debug.config There seems to be no clear or simple way to exclude them ( as per this discussion ).
  • The .llbsite dll file is in the wrong place, in the root folder, and not in the bin folder ( as per this discussion )

However, if you do not use harvesting, you have many files for linking manually (for example, only under \Content\ I have 58 files in 5 folders. Most of this is the jQuery user interface) and they change from time to time. and errors and omissions can easily be skipped from the list of WiX files. Therefore, it should automatically sync.

I do not agree that the list of files should be explicitly specified in WiX and not be dynamically generated (which, it seems, is proposed on the first channel, the wording is not very clear). If I need to delete a file, I will delete it, if there is no need to do additional work from the source control system to maintain two parallel but different directories - one set of files in the source control and the same files listed in WiX. there must be one version of the truth. All files in the source tree of the website (with some known exceptions that are not used at run time, such as packages.config ) should be included in the deployment.

For corporate reasons, I don’t have much choice in using WiX for this project.

+7
source share
2 answers

In our MVC 3 project, we use Paraffin to collect files for the installer. For example, you can use "-ext" to ignore files with the extension, use "regExExclude" to ignore the file name matching the regular expression, etc.

Paraffin also maintains the correct structure, all your files will be in the correct folder as they appear in your project.

+4
source

I am using a program I wrote called ISWIX that makes wxs authoring merge modules a simple drag and drop operation such as InstallShield. Then I use this merge module in the installer, which handles the configuration of the user interface and IIS.

I also have post-automation that extracts the contents of MSI and compares it with what was published in the project. If there is a delta, I am not assembling and you need to either a) add it to wxs or b) remove it from the publication.

I find that the selection from the assembly file for the assembly is minimal and that this system is easy to maintain. Potential is all that is 100% intentionally created, and files are never magically added or removed from the installer if you did not intend to use them. Dynamically creating an installer is not worth the risk, and most people who claim that they don’t even know what these risks are.

+2
source

All Articles