尝试根据教程 Deploying your applications to Azure 配置 MS Release Manager 时,根据Error when using Publish Build Artifacts on the host agent修改,我收到以下异常:
The item
MY_ARTIFACT_NAME
in container 56811 could not be found.
这会导致发布被拒绝。
我已添加 system.debug
变量并将其设置为 true,(请参阅 Publish build artifacts - I'm having problems ),但未提供其他信息。
我的 Visual Studio 构建已成功完成,并且配置如下:
MSBuild 参数:
/p:DeployOnBuild=true/p:WebPublishMethod=包/p:PackageAsSingleFile=true
/p:SkipInvalidConfigurations=true/p:PackageLocation="$(build.stagingDirectory)"
平台: $(BuildPlatform)
配置: $(BuildConfiguration)
复制并发布构建工件
内容: *.*
工件名称: MY_ARTIFACT_NAME
工件类型: 服务器
我的 Azure Web 应用程序部署的配置如下:
Web 部署包: $(Agent.BuildDirectory)\**\*.zip
最佳答案
“复制并发布构建工件”任务不会使用您的配置将任何内容复制到工件文件夹,您需要按以下方式配置它:
Copy Root: $(build.stagingDirectory)
Contents: **\*.zip
Artifact Name: MY_ARTIFACT_NAME
Artifact Type: Server
在您的发布定义中,“$(Agent.BuildDirectory)”也不起作用。默认情况下,您需要使用 $(System.DefaultWorkingDirectory)\**\*.zip。
关于azure - 找不到容器 XXX 中的项目 MY_ARTIFACT_NAME,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34165912/