The item MY_ARTIFACT_NAME in container XXX could not be found

纵然是瞬间 提交于 2019-12-19 10:21:37

问题


When attempting to configure MS Release Manager based on the tutorial Deploying your applications to Azure, modified per Error when using Publish Build Artifacts on the host agent, I receive the following exception:

The item MY_ARTIFACT_NAME in container 56811 could not be found.

which results in the release being rejected.

I have added the system.debug variable and set it to true,(see Publish build artifacts - I'm having problems) but no additional information is provided.

My Visual Studio Build completes successfully and is configured like so:

MSBuild Arguments:

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

Platform: $(BuildPlatform)

Configuration: $(BuildConfiguration)

Copy and Publish Build Artifacts

Contents: *.*

Artifact Name: MY_ARTIFACT_NAME

Artifact Type: Server

My Azure Web App Deployment is configured like so:

Web Deploy Package: $(Agent.BuildDirectory)\**\*.zip


回答1:


The "Copy and Publish Build Artifacts" task isn't copying anything to artifact folder with your configuration, you need to configure it as following:

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

And in your release definition, "$(Agent.BuildDirectory)" does not work either. You need to use the $(System.DefaultWorkingDirectory)\**\*.zip by default.



来源:https://stackoverflow.com/questions/34165912/the-item-my-artifact-name-in-container-xxx-could-not-be-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!