【问题标题】:How do I use Visual Studio 2010 RC 'one click publish' from the command line?如何从命令行使用 Visual Studio 2010 RC“一键发布”?
【发布时间】:2010-02-16 18:06:23
【问题描述】:

我运行了 VS 2010 RC,并在其中设置了两个发布配置文件,一个用于发布到登台服务器,一个用于开发人员测试盒。它工作得很好,但我想将部署到我们的开发服务器放入我们的构建服务器并在签入时运行它。

我正在寻找一个 MS Build 目标或我可以通过 MS Build 调用的命令,我可以在构建过程结束时进行部署。到目前为止,我想出了;

msbuild WebApp.csproj /t:MsDeployPublish 
    /p:MsDeployServiceUrl=myserver;DeployIisAppPath=
        "Default Web Site/DevTest";username=myname;password=mypassword

这几乎可以工作,除了它假设我的服务器在 IIS 中有一个用于 Web 部署服务的 SSL 连接(它只有端口 80,因为它在内部网络上)。我知道这一点,因为我得到了错误;

Microsoft.Web.Publishing.targets(3481,5): error : Web deployment 
task failed.(Could not complete the request to remote agent URL 
'https://myserver:8172/msdeploy.axd?site=Default Web Site'.)

您可以从错误中看到它已转到https://myserver 而不是http://myserver

MS Build 本身似乎调用了一个 DLL 来执行此操作,因此我无法监视参数,并且没有有关 MsDeployServiceUrl 的文档。

【问题讨论】:

    标签: visual-studio visual-studio-2010 msbuild msdeploy msdeployserviceagent


    【解决方案1】:

    尝试添加:

     /p:AllowUntrustedCertificate=True 
    

    添加到 msbuild 的参数列表

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多