【问题标题】:How to create web deploy package in VSTS/VSO Build vNext?如何在 VSTS/VSO Build vNext 中创建 Web 部署包?
【发布时间】:2016-05-21 05:23:14
【问题描述】:

我在 Visual Studio Team Services(以前的 Visual Studio Online)中有一个自动构建。该解决方案正在正确构建。如何配置它以便它也可以创建一个 Web 部署包?

【问题讨论】:

    标签: build msbuild azure-devops azure-pipelines


    【解决方案1】:

    我们在“Visual Studio Build”任务中启用 Web 部署包创建。只需传递以下 MS Build 参数:

    MSBuild 参数:/p:DeployOnBuild=true;PublishProfile=<name of your profile>

    【讨论】:

    • 使用 /p:Password=MyPassword 避免提交密码
    【解决方案2】:

    我们使用以下 MSBuild 参数:/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"

    使用这些,您无需创建新的发布配置文件。

    【讨论】:

    • 我有一个包含多个 Web 项目的解决方案,必须取消选中“清理”才能使其正常工作。
    • @BurnsBA 您可能存在未按正确顺序构建或引用不正确的依赖项我目前遇到此问题。我必须纠正很多解决方案和项目才能正确构建项目。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-10
    • 1970-01-01
    相关资源
    最近更新 更多