导出 (0) 打印
全部展开

Web Deploy gacInstall Provider

更新时间: 2011年2月

应用到: Windows 7, Windows Server 2008 R2

gacInstall

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

Example

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.

Important重要事项
The gacInstall provider is available only in Web Deploy 2.0 and later versions.

dump

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

sync

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.

Important重要事项
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.

note备注
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

本文是否对您有所帮助?
(1500 个剩余字符)
感谢您的反馈

社区附加资源

添加
Microsoft 正在进行一项网上调查,以了解您对 MSDN 网站的意见。 如果您选择参加,我们将会在您离开 MSDN 网站时向您显示该网上调查。

是否要参加?
显示:
© 2014 Microsoft