• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Using WiX to deploy a web application

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Using WiX to deploy a web application

    I'm building an installer for an MVC web app using WiX. WiX is very poerwful but like most open source software, it is poorly documented and I have found myself relying on posts om newsnet which have , more often than not, led me down the garden path.

    A couple of things which somebody may be able to cooberate.

    1) Harvesting usinfg heat.exe - Because the installer project is incorporated into the TFS build process, I need to harvest 3rd party dlls from a common location. The build machine won't have the bin folder that I have when building locally so I have chosen to harvest my files from the nuget packages folder. The problem here is that it harvests absolutely every file in this folder and all its subfolders when I only really want a subset of this.

    Even so, this subset consists of about 70 files or so so I don't want to be doing this manually. There is a command line switch that allows you to specify the type of output but it doesn't actually do anything. I've come to the conclusion that heat.exe doesn't do what it says on the tin but these issues will be addressed in the illusive version 4 release of the WiX toolset.

    2) IIS extensions - The only IIS support appears to be for IIS6 though I've reached this conclusion from reading some rather old posts. However, there seems to be no mention anywhere of support for IIS7 so I'm assming that there are no IIS extensions for IIS7.

    #2
    I recommend moving heaven and earth to avoid using Wix. I too have spent hours in Google finding odd snippets of information from old forum and usenet posts, none of which were ever complete, just hints on the hack somebody found to get one thing working.

    Given that the WIX file is XML, you could look at doing your own version of heat that does what you want. At previous Permie Co. we had some python that would build the Wix file based on what the build system knew had to be installed.
    Will work inside IR35. Or for food.

    Comment


      #3
      This was a mighty useful tutorial for me:

      Creating a WIX Installer for ASP.NET Web Applications - CodeProject

      What we ended up doing was adding an msbuild task to the referenced web project to essentially output the required project files in a .wxs file in the setup project. It is explained very well in this tutorial:

      Creating a Web Application Installer with WIX 3.5 and Visual Studio 2010–Part 1

      Check out the link "How to consume MSDeploy Staged Web Site Output in a WIX Installer".

      In our case, we build the project locally (either in debug or prod configuration, in ASP.NET), and then copy the msi to dev/live server, and install the website. As part of the install, we also allow the user to configure IIS settings like virtual directory name, credentials etc. All of this can be found in the first code project link. Good Luck!

      P.S: If you also want to automatically increment the revision number of you msi every time you build, have a look at this:

      http://blog.tentaclesoftware.com/arc.../05/03/38.aspx
      Last edited by tranceporter; 21 June 2013, 16:45.
      I am Brad. I do more than the needful and drive the market rates up by not bobbing my head.

      Comment


        #4
        Originally posted by tranceporter View Post
        As part of the install, we also allow the user to configure IIS settings like virtual directory name, credentials etc. All of this can be found in the first code project link. Good Luck!
        Yes, but the problem is those IIS WiX extensions referenced in the first link only support IIS6. I had seen that article before.

        Might be some useful stuff in the other links though - especially re incrementing version numbers.

        Thanks.

        Comment


          #5
          Originally posted by VectraMan View Post

          Given that the WIX file is XML, you could look at doing your own version of heat that does what you want. At previous Permie Co. we had some python that would build the Wix file based on what the build system knew had to be installed.
          That would be an option normally but I have to do something quick and dirty to demo at the end of the current sprint I'm working on.

          Comment


            #6
            Originally posted by zoco View Post
            Yes, but the problem is those IIS WiX extensions referenced in the first link only support IIS6. I had seen that article before.

            Might be some useful stuff in the other links though - especially re incrementing version numbers.

            Thanks.
            Umm.. we have IIS 7.5 here, and it seems to be holding up just fine..
            I am Brad. I do more than the needful and drive the market rates up by not bobbing my head.

            Comment


              #7
              Originally posted by tranceporter View Post
              Umm.. we have IIS 7.5 here, and it seems to be holding up just fine..
              Interseting... The documentation I read states that it's II6 specific and that support for IIS 7 would be in a future version. I will have to give it a whirl and see what happens.

              Comment

              Working...
              X