« Previous Next »

Answered Thread: GAC sync and IIS restart

Last post 11-23-2009 10:40 PM by mikemelendez. 2 replies.

 

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 11-23-2009, 8:07 PM

    • mikemelendez
    • Not Ranked
    • Joined on 10-02-2009, 11:48 PM
    • Scottsdale, Az
    • Posts 2

    GAC sync and IIS restart

    I'm looking to replace our current deployment strategy to one using msdeploy.  Right now we create an msi for our custom gac assemblies.  We stop iis, install the msi, then restart iis. 

    If I move to msdeploy, I can use sync to move my gac assemblies to the production web server.  Does sync work even if the gac assemblies are in use?  Will it be able to overwrite them, or will it restart iis? 

  • 11-23-2009, 9:33 PM In reply to

    Answered Re: GAC sync and IIS restart

    It will not be able to overwrite any file that is in use. But you can use presync and postsync to stop and start iis (or stop and start apppool). This way the gacAssemblies will get replaced by one command.

    msdeploy -verb:sync -source:gacAssembly=Myassembly.assembly -dest:auto,computername=server -presync:runCommand="c:\stopiis.cmd" -postsync:runCommand="C:\startiis.cmd"

    Let us know if you need more information.

     

     

  • 11-23-2009, 10:40 PM In reply to

    • mikemelendez
    • Not Ranked
    • Joined on 10-02-2009, 11:48 PM
    • Scottsdale, Az
    • Posts 2

    Re: GAC sync and IIS restart

    Thanks, that's just what I needed.  I didn't realize I could run a command on the destination computer.
Page 1 of 1 (3 items)