Web Deploy gacAssembly Provider
Applies To: Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP
The gacAssembly provider synchronizes a GAC assembly.
msdeploy -verb:sync -source:gacassembly="MyTestAssembly" -dest:package=c:\package.zip
The gacAssembly provider can display or synchronize the program files for a specified assembly from the Global Assembly Cache (GAC). The gacAssembly provider takes the short name of an assembly as its input. Although you can use the strong name, it is recommended that you use the short name to avoid introducing errors.
The gacAssembly provider synchronizes assemblies that have been compiled with the preferred .NET framework version as specified in the msdeploy.exe.config file, which is located at the following path:
c:\Program Files\IIS\Microsoft Web Deploy V2
The preferred framework version is specified by the first supportedRuntime element. By default this is the .NET Framework 2.0, as shown in the following example:
<configuration> <startup> <supportedRuntime version="v2.0.50727" /> <supportedRuntime version="v4.0" /> </startup> </configuration>
If you need to synchronize an assembly compiled with .NET Framework 4, change the order of the supportedRuntime elements to make v4.0 first. For a remote GAC deployment, the msdepsvc.exe.config file should also be changed in the same way.
In Windows Server® 2008 R2, Windows® 7, and earlier operating systems, by default, GAC deployment using Web Management Service (WMSVC) does not work for .NET 4.0 assemblies.
In a dump operation, the gacAssembly provider returns the file paths for all files related to the specified assembly.
A sync operation synchronizes an installed GAC assembly from the source computer to the GAC on the destination computer. If the specified assembly and its related program files are not found on the destination computer, they will be copied from the source computer to the destination computer. If the assembly is present on the destination computer, its related files will be updated.
The assembly name you specify for the source and the destination should be the same. The full strong name is defined by the assembly itself, not by the GAC, and therefore cannot be changed. You cannot copy an assembly to another computer and give the assembly a different name on the second computer.
In Web Deploy 2.0, you can synchronize an assembly from a source to a destination even if the assembly is not installed in the GAC of the source computer. This feature can be useful if, for example, the source is a package (.zip file), or a build computer on which you do not want to have an assembly installed. For more information, see Web Deploy gacInstall Provider.
The gacAssembly provider has the following limitations:
Satellite assemblies will not be moved.
Only single-file GAC assemblies will be moved. If the assembly is multi-module, only the CodeBase (the file containing the assembly manifest) will be moved.
The provider will not detect the framework version(s) required by a particular assembly.
The bitness (32–bit or 64–bit) of the assembly will not be examined.
1) Return the paths for the files related to the "MyTestAssembly" assembly.
msdeploy -verb:dump -source:gacAssembly="MyTestAssembly"
2) Synchronize the "MyTestAssembly" assembly and its related files to an archive located in the c:\archive directory.
msdeploy -verb:sync -source:gacassembly="MyTestAssembly" -dest:archivedir=c:\archive