【问题标题】:What is the difference between a Publish and a WebPublish target?Publish 和 WebPublish 目标之间有什么区别?
【发布时间】:2016-10-07 18:22:23
【问题描述】:

我们有一个构建配置运行器类型的 Visual Studio.sln 设置来从具有发布配置文件 (/P:PublishProfile=%env) 的 csproj 中读取.Configuration%.pubxml) 创建一个 Web 部署包,然后我们在另一个构建步骤中使用它来使用 MSDeploy 进行部署。

在 TeamCity 上,目标选项表明

Enter targets separated by space or semicolon. Build, Rebuild, Clean, Publish targets are supported by default

查看其他一些 StackOverflow 线程,它提到使用 WebPublish 作为目标有效,但没有说明为什么有效。

TeamCity: How tell MSBuild to take into account publish profile parameters?

我不确定“发布”和“WebPublish”之间的区别。

【问题讨论】:

    标签: msbuild teamcity


    【解决方案1】:

    “发布”Visual Studio 目标在后台使用 WebDeploy/WebPublish 进行发布。

    【讨论】:

    • 具体来说,如果您传递了DeployTarget=WebPublish 或传递了PublishProfile 的值,Publish 将调用WebPublish。见Microsoft.Web.Publishing.targets:137
    猜你喜欢
    • 1970-01-01
    • 2023-03-11
    • 2017-10-22
    • 2015-08-22
    • 1970-01-01
    • 1970-01-01
    • 2011-08-18
    • 1970-01-01
    • 2020-08-31
    相关资源
    最近更新 更多