2
votes

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

1 Answers

5
votes

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.