Condividi tramite


How To Use MSDeploy to Migrate Global Assembly Cache

Hi,

I am playing with MSDeploy quite a lot these days and it is great. I just want to share information about how we can use it to install assembly in GAC.

I wrote a strongly typed assembly for a test and installed it on my Windows 7 laptop. Here is an information about that assembly:

 

Here is syntax to synchronize assembly from my machine to other machine:

msdeploy -verb:sync -source:gacAssembly="' AssemblyUday, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c7ae5fd536683962'" -dest:gacAssembly,computername=ARRMSD,username=administrator@contoso.com,password=Pa$$w0rd

 

Alternatively, if you do not want to synchronize between machines, you can archive the package and move the package files to production server and synchronize production machine with archivedir.

msdeploy -verb:sync -source:gacAssembly="' AssemblyUday, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c7ae5fd536683962'" -dest:archiveDir=c:\ToGoForProduction

Isn’t it great? I think it is awesome rather using GACUTIL.EXE or MSI installer.