Exportar (0) Imprimir
Expandir todo

Web Deploy gacInstall Provider

Actualizado: febrero de 2011

Se aplica a: Windows 7, Windows Server 2008 R2


The gacInstall provider synchronizes a DLL file to GAC assembly, or a GAC assembly to a DLL file.


msdeploy -verb:sync -source:gacInstall="c:\mybuild\My.App.dll" -dest:gacInstall="My.App",computerName=Server2

The gacInstall provider installs a GAC assembly on a destination computer when its corresponding DLL file is not installed on the source. This can be useful when the source computer is a build computer on which you do not want to have the DLL installed in the GAC, or when the source is a package (.zip file). The provider can also take a DLL that is installed in the GAC on the source and copy it as a file on the destination.

The gacInstall 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 gacInstall provider is available only in Web Deploy 2.0 and later versions.


In a dump operation, the gacInstall provider returns the path of the specified source object.


In a sync operation, 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.

If you want to synchronize an assembly that is installed in the GAC on a source computer to the GAC on a destination computer, you should use the Web Deploy gacAssembly Provider.

Example usages

1) Synchronize the "My.Assembly.dll" file from the local computer and install it in the GAC on Server2.

msdeploy.exe -verb:sync -source:gacInstall="c:\mybuild\My.Assembly.dll" -dest:gacInstall="My.Assembly",computername="Server2",username=Server2User,password=Server2UserPass,authType=basic –allowUntrusted

2) Synchronize the DLL file from the "Contoso.Main.App" assembly in the GAC on the local computer to the "Contoso.Main.App.dll" file on Server2.

msdeploy -verb:sync -source:gacinstall="Contoso.Main.App" -dest:gacinstall="c:\Contoso.Main.App.dll",computername="Server2",username=Server2User,password=Server2UserPass,authType=basic –allowUntrusted

Adiciones de comunidad

© 2016 Microsoft