无法找到容器XXX中的项目MY_ARTIFACT_NAME

时间:2015-12-08 20:59:41

标签: azure azure-devops ms-release-management azure-web-app-service

尝试根据每个Deploying your applications to Azure修改的教程Error when using Publish Build Artifacts on the host agent配置MS Release Manager时,我收到以下异常:

  

找不到容器56811中的项MY_ARTIFACT_NAME

导致发布被拒绝。

我添加了system.debug变量并将其设置为 true ,(请参阅Publish build artifacts - I'm having problems),但未提供其他信息。

我的Visual Studio Build成功完成,配置如下:

MSBuild参数:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.stagingDirectory)"

平台: $(BuildPlatform)

配置: $(BuildConfiguration)

复制和发布构建工件

内容: *.*

工件名称: MY_ARTIFACT_NAME

神器类型: Server

我的Azure Web App部署配置如下:

Web部署包: $(Agent.BuildDirectory)\**\*.zip

1 个答案:

答案 0 :(得分:5)

"复制和发布构建工件"任务没有使用您的配置将任何内容复制到工件文件夹,您需要将其配置如下:

Copy Root: $(build.stagingDirectory)
Contents: **\*.zip
Artifact Name: MY_ARTIFACT_NAME
Artifact Type: Server

在您的发布定义中," $(Agent.BuildDirectory)"也不起作用。默认情况下,您需要使用$(System.DefaultWorkingDirectory)\ ** \ * .zip。