Getting the following error after a successful MsBuild on a TFS Build Server:
ERROR: Value cannot be null.
Parameter name: The attribute 'BuildNumber' is not part of this XElement
at Microsoft.TeamFoundation.Release.Common.ExtensionMethods.XmlExtensionMethods.GetAttributeValue(XElement element, XName attributeName)
at Microsoft.TeamFoundation.Release.Data.Model.ReleaseComponent.SetBuildToLatest()
at Microsoft.TeamFoundation.Release.Workflow.Services.ReleaseWorkflowService.InitiateFromBuild(Uri teamFoundationServerUrl, String teamProject, String buildDefinition, String buildNumber, String targetStageName)
at Microsoft.TeamFoundation.Release.Build.Program.Release()
at Microsoft.TeamFoundation.Release.Build.Program.MainImplementation(String[] args, Action`1 consoleWriter, Action releaseAction)
Build is part of Release Management pipeline that automatically deploys to DEV server.
Any ideas?
Found the issue:
Had two components in the release process -- Second component in the release process used a different build template than the first. First component deployed successfully, but second component had no builds in TFS yet, so BuildNumber was null.