如何使用 MSDeploy 通过 http 同步整个解决方案?

发布于 2024-12-04 01:10:49 字数 169 浏览 0 评论 0原文

我可以使用 MSDeploy 通过 Visual Studio 2010 SP1“发布”向导一次部署一个项目。我通过http部署。

我的 Visual Studio 解决方案包含许多项目,其中一些依赖于共享 DLL。是否可以同步整个解决方案?

我的目标是完全自动化部署。

卡尔

I'm able to use MSDeploy to deploy one project at a time with the Visual Studio 2010 SP1 "Publish" wizard. I deploy over http.

My visual studio solution contains many projects and some depends on shared DLL. Is it possible to sync a whole solution?

My goal would be to fully automate deployment.

Carl

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最好是你 2024-12-11 01:10:49

为什么不直接从命令行使用 WDeploy?您可以指定一个清单文件,在其中放置部署所需的所有组件,然后与清单 msdeploy 提供程序同步:


Source manifest (Source.xml)
<MyDeployment>
        <appHostConfig path="MyLocalSiteName" />
<!-- 
     You can also use iisApp depending on what permissions you have on the remote server.
     If you have permissions execute appHostConfig that will create a site if the site does not exist.
 -->
        <iisApp path="MyLocalSiteName\MyApp" />

        <dirPath path="C:\Solution\Project1" />
        <dirPath path="C:\Solution\Project2" />
        <gacAssembly path="My.GACed.Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1111111111'" />
</MyDeployment>


Destination manifest (Destination.xml)
<MyDeployment>
        <appHostConfig path="MyRemoteSiteName" />
        <iisApp path="MyRemoteSiteName\MyApp" />

        <dirPath path="\\RemoteServerShare\Solution\Project1" />
        <dirPath path="\\RemoteServerShare\Solution\Project2" />
        <gacAssembly path="My.GACed.Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1111111111'" />
</MyDeployment>

命令行为:

msdeploy.exe -verb:sync -source:manifest= Source.xml -dest:manifest=Destination.xml,computername=MyServer

... 反对 MSDeploy 代理,或

msdeploy.exe -verb:sync -source:manifest=Source.xml -dest:manifest=Destination.xml,wmsvc=MyServer,username=User2,password=4321,authtype=basic

...针对 WMSvc。

这篇博文可以帮助您开始使用清单提供程序这篇 TechNet 文章可以解释一些有用的提供商设置。

Why don't you use WDeploy directly from the command line? You can specify a manifest file, where you'd put all necessary components for deployment and then sync against manifest msdeploy provider:


Source manifest (Source.xml)
<MyDeployment>
        <appHostConfig path="MyLocalSiteName" />
<!-- 
     You can also use iisApp depending on what permissions you have on the remote server.
     If you have permissions execute appHostConfig that will create a site if the site does not exist.
 -->
        <iisApp path="MyLocalSiteName\MyApp" />

        <dirPath path="C:\Solution\Project1" />
        <dirPath path="C:\Solution\Project2" />
        <gacAssembly path="My.GACed.Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1111111111'" />
</MyDeployment>


Destination manifest (Destination.xml)
<MyDeployment>
        <appHostConfig path="MyRemoteSiteName" />
        <iisApp path="MyRemoteSiteName\MyApp" />

        <dirPath path="\\RemoteServerShare\Solution\Project1" />
        <dirPath path="\\RemoteServerShare\Solution\Project2" />
        <gacAssembly path="My.GACed.Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1111111111'" />
</MyDeployment>

And the command line would be:

msdeploy.exe -verb:sync -source:manifest=Source.xml -dest:manifest=Destination.xml,computername=MyServer

... to go against MSDeploy agent, or

msdeploy.exe -verb:sync -source:manifest=Source.xml -dest:manifest=Destination.xml,wmsvc=MyServer,username=User2,password=4321,authtype=basic

... to against WMSvc.

This blog post can get you started on the manifest provider and this TechNet article can explain some useful provider settings.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文