Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update link build to task #19

Closed
gavinbarron opened this issue Dec 12, 2017 · 2 comments
Closed

Cannot update link build to task #19

gavinbarron opened this issue Dec 12, 2017 · 2 comments

Comments

@gavinbarron
Copy link

When running a CI build using the Agile Template the task throws a NullReferenceException when attempting to link the build to the task.

The CI task is only configured with item type = task and Add Build As Development Link checked. All other options are left as default.


Starting: Link Build to Tasks


==============================================================================
Task : WorkItem Updater
Description : This task allows to update WorkItems linked to the build.
Version : 1.4.716
Author : Blue Basher
Help :

Updating WorkItem 47088
You cannot call a method on a null-valued expression.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
Cannot validate argument on parameter 'Result'. The argument "Error updating workitems" does not belong to the set "Succeeded,SucceededWithIssues,Failed,Cancelled,Skipped" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.

@gavinbarron
Copy link
Author

Info from a debug run. Changed the config to set the state to completed just in case that was the issue too.

2017-12-12T23:58:25.0723206Z ##[debug]Evaluating condition for step: 'Link Build to Tasks'
2017-12-12T23:58:25.0723738Z ##[debug]Evaluating: succeeded()
2017-12-12T23:58:25.0723872Z ##[debug]Evaluating succeeded:
2017-12-12T23:58:25.0724212Z ##[debug]=> (Boolean) True
2017-12-12T23:58:25.0724446Z ##[debug]Expanded: True
2017-12-12T23:58:25.0724694Z ##[debug]Result: True
2017-12-12T23:58:25.0724902Z ##[section]Starting: Link Build to Tasks
2017-12-12T23:58:25.0728081Z ==============================================================================
2017-12-12T23:58:25.0728217Z Task         : WorkItem Updater
2017-12-12T23:58:25.0728331Z Description  : This task allows to update WorkItems linked to the build.
2017-12-12T23:58:25.0728454Z Version      : 1.4.716
2017-12-12T23:58:25.0728553Z Author       : Blue Basher
2017-12-12T23:58:25.0728648Z Help         : 
2017-12-12T23:58:25.0728756Z ==============================================================================
2017-12-12T23:58:38.1449668Z ##[debug]VstsTaskSdk 0.8.1 commit 
2017-12-12T23:58:40.0556382Z ##[debug]Importing function 'Assert-Path'.
2017-12-12T23:58:40.0573288Z ##[debug]Importing function 'Find-Files'.
2017-12-12T23:58:40.0590960Z ##[debug]Importing function 'Find-Match'.
2017-12-12T23:58:40.0619330Z ##[debug]Importing function 'Get-AssemblyReference'.
2017-12-12T23:58:40.0731495Z ##[debug]Importing function 'Get-Endpoint'.
2017-12-12T23:58:40.0732873Z ##[debug]Importing function 'Get-Input'.
2017-12-12T23:58:40.0733315Z ##[debug]Importing function 'Get-LocString'.
2017-12-12T23:58:40.0733672Z ##[debug]Importing function 'Get-TaskVariable'.
2017-12-12T23:58:40.0734043Z ##[debug]Importing function 'Get-TaskVariableInfo'.
2017-12-12T23:58:40.0734510Z ##[debug]Importing function 'Get-TfsClientCredentials'.
2017-12-12T23:58:40.0734953Z ##[debug]Importing function 'Get-TfsService'.
2017-12-12T23:58:40.0735343Z ##[debug]Importing function 'Get-VssCredentials'.
2017-12-12T23:58:40.0742679Z ##[debug]Importing function 'Get-VssHttpClient'.
2017-12-12T23:58:40.0758987Z ##[debug]Importing function 'Import-LocStrings'.
2017-12-12T23:58:40.0776011Z ##[debug]Importing function 'Invoke-Tool'.
2017-12-12T23:58:40.0795066Z ##[debug]Importing function 'New-FindOptions'.
2017-12-12T23:58:40.0811055Z ##[debug]Importing function 'New-MatchOptions'.
2017-12-12T23:58:40.0827107Z ##[debug]Importing function 'Out-Default'.
2017-12-12T23:58:40.0850761Z ##[debug]Importing function 'Select-Match'.
2017-12-12T23:58:40.0866597Z ##[debug]Importing function 'Set-TaskVariable'.
2017-12-12T23:58:40.0887233Z ##[debug]Importing function 'Trace-EnteringInvocation'.
2017-12-12T23:58:40.0900647Z ##[debug]Importing function 'Trace-LeavingInvocation'.
2017-12-12T23:58:40.0917462Z ##[debug]Importing function 'Trace-Path'.
2017-12-12T23:58:40.0933768Z ##[debug]Importing function 'Write-AddAttachment'.
2017-12-12T23:58:40.0951012Z ##[debug]Importing function 'Write-AddBuildTag'.
2017-12-12T23:58:40.0968496Z ##[debug]Importing function 'Write-AssociateArtifact'.
2017-12-12T23:58:40.0985734Z ##[debug]Importing function 'Write-LogDetail'.
2017-12-12T23:58:40.1009528Z ##[debug]Importing function 'Write-SetProgress'.
2017-12-12T23:58:40.1026260Z ##[debug]Importing function 'Write-SetResult'.
2017-12-12T23:58:40.1043188Z ##[debug]Importing function 'Write-SetSecret'.
2017-12-12T23:58:40.1074159Z ##[debug]Importing function 'Write-SetVariable'.
2017-12-12T23:58:40.1318689Z ##[debug]Importing function 'Write-TaskDebug'.
2017-12-12T23:58:40.1318976Z ##[debug]Importing function 'Write-TaskError'.
2017-12-12T23:58:40.1319146Z ##[debug]Importing function 'Write-TaskVerbose'.
2017-12-12T23:58:40.1319328Z ##[debug]Importing function 'Write-TaskWarning'.
2017-12-12T23:58:40.1319495Z ##[debug]Importing function 'Write-UpdateBuildNumber'.
2017-12-12T23:58:40.1319675Z ##[debug]Importing function 'Write-UploadArtifact'.
2017-12-12T23:58:40.1319840Z ##[debug]Importing function 'Write-UploadBuildLog'.
2017-12-12T23:58:40.1320032Z ##[debug]Entering D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\task.ps1.
2017-12-12T23:58:40.3950087Z ##[debug]BUILD_BUILDID: '18347'
2017-12-12T23:58:40.3973610Z ##[debug]SYSTEM_TEAMPROJECTID: 'c2efa575-f4ae-4d93-a2bc-ca4989d737bd'
2017-12-12T23:58:40.4039105Z ##[debug]BUILD_REQUESTEDFOR: 'Gavin Barron'
2017-12-12T23:58:40.4910784Z ##[debug]INPUT_WORKITEMTYPE: 'Task'
2017-12-12T23:58:40.4934070Z ##[debug]INPUT_WORKITEMSTATE: 'Completed'
2017-12-12T23:58:40.4955843Z ##[debug]INPUT_WORKITEMCURRENTSTATE (empty)
2017-12-12T23:58:40.5010585Z ##[debug]INPUT_WORKITEMKANBANLANE (empty)
2017-12-12T23:58:40.5036765Z ##[debug]INPUT_WORKITEMKANBANSTATE (empty)
2017-12-12T23:58:40.5059619Z ##[debug]INPUT_WORKITEMDONE: 'false'
2017-12-12T23:58:40.5086575Z ##[debug] Converted to bool: False
2017-12-12T23:58:40.5120113Z ##[debug]INPUT_LINKBUILD: 'true'
2017-12-12T23:58:40.5136397Z ##[debug] Converted to bool: True
2017-12-12T23:58:40.5159614Z ##[debug]INPUT_UPDATEASSIGNEDTO: 'Never'
2017-12-12T23:58:40.5212222Z ##[debug]BuildId 18347
2017-12-12T23:58:40.5225552Z ##[debug]ProjectId c2efa575-f4ae-4d93-a2bc-ca4989d737bd
2017-12-12T23:58:40.5245396Z ##[debug]requestedFor Gavin Barron
2017-12-12T23:58:40.5256780Z ##[debug]workItemType Task
2017-12-12T23:58:40.5269675Z ##[debug]WorkItemState Completed
2017-12-12T23:58:40.5280344Z ##[debug]workItemCurrentState 
2017-12-12T23:58:40.5290894Z ##[debug]updateWorkItemKanbanLane 
2017-12-12T23:58:40.5301503Z ##[debug]WorkItemKanbanState 
2017-12-12T23:58:40.5312761Z ##[debug]WorkItemDone False
2017-12-12T23:58:40.5323891Z ##[debug]updateAssignedTo Never
2017-12-12T23:58:40.5345415Z ##[debug]Converting buildId '18347' as int
2017-12-12T23:58:40.5357463Z ##[debug]Converting projectId 'c2efa575-f4ae-4d93-a2bc-ca4989d737bd' as GUID
2017-12-12T23:58:40.5602648Z ##[debug]Entering Get-VssHttpClient.
2017-12-12T23:58:40.5710892Z ##[debug] TypeName: 'Microsoft.TeamFoundation.WorkItemTracking.WebApi.WorkItemTrackingHttpClient'
2017-12-12T23:58:40.5772283Z ##[debug]SYSTEM_TEAMFOUNDATIONCOLLECTIONURI: 'https://intergen.visualstudio.com/'
2017-12-12T23:58:40.6403926Z ##[debug]Entering Get-VssCredentials.
2017-12-12T23:58:40.6422621Z ##[debug] OMDirectory: ''
2017-12-12T23:58:40.6547982Z ##[debug]ENDPOINT_URL_SystemVssConnection: 'https://intergen.visualstudio.com/'
2017-12-12T23:58:40.6572541Z ##[debug]ENDPOINT_AUTH_SystemVssConnection: '********'
2017-12-12T23:58:40.6599431Z ##[debug]ENDPOINT_DATA_SystemVssConnection (empty)
2017-12-12T23:58:40.6740817Z ##[debug]Entering Get-OMType.
2017-12-12T23:58:40.6756712Z ##[debug] TypeName: 'Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential'
2017-12-12T23:58:40.6773147Z ##[debug] OMKind: 'WebApi'
2017-12-12T23:58:40.6789633Z ##[debug] OMDirectory: ''
2017-12-12T23:58:40.6811596Z ##[debug]Defaulted OM directory to: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716'
2017-12-12T23:58:40.6828651Z ##[debug]Testing whether type can be loaded: 'Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential'
2017-12-12T23:58:41.3606266Z ##[debug]The type was not loaded.
2017-12-12T23:58:41.4005030Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.OAuth.WebApi.dll'
2017-12-12T23:58:41.4025156Z ##[debug]Not found.
2017-12-12T23:58:41.4047304Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.OAuth.dll'
2017-12-12T23:58:41.4066540Z ##[debug]Not found.
2017-12-12T23:58:41.4179160Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.WebApi.dll'
2017-12-12T23:58:41.4198607Z ##[debug]Loading assembly: D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.WebApi.dll
2017-12-12T23:58:41.4478317Z ##[debug]Resolving 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
2017-12-12T23:58:41.4677512Z ##[debug]Resolving 'System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
2017-12-12T23:58:41.5898377Z ##[debug]Testing whether type can be loaded: 'Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential'
2017-12-12T23:58:41.5947865Z ##[debug]The type was not loaded.
2017-12-12T23:58:41.5965490Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.dll'
2017-12-12T23:58:41.5984771Z ##[debug]Not found.
2017-12-12T23:58:41.6012937Z ##[debug]Leaving Get-OMType.
2017-12-12T23:58:41.6040879Z ##[debug]Entering Get-OMType.
2017-12-12T23:58:41.6055557Z ##[debug] TypeName: 'Microsoft.VisualStudio.Services.Client.VssOAuthCredential'
2017-12-12T23:58:41.6070493Z ##[debug] OMKind: 'WebApi'
2017-12-12T23:58:41.6084989Z ##[debug] OMDirectory: ''
2017-12-12T23:58:41.6128509Z ##[debug] Require: 'True'
2017-12-12T23:58:41.6143278Z ##[debug]Defaulted OM directory to: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716'
2017-12-12T23:58:41.6157654Z ##[debug]Testing whether type can be loaded: 'Microsoft.VisualStudio.Services.Client.VssOAuthCredential'
2017-12-12T23:58:41.6183248Z ##[debug]The type was not loaded.
2017-12-12T23:58:41.6198718Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.Client.WebApi.dll'
2017-12-12T23:58:41.6215456Z ##[debug]Not found.
2017-12-12T23:58:41.6235040Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.Client.dll'
2017-12-12T23:58:41.6253609Z ##[debug]Loading assembly: D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.Client.dll
2017-12-12T23:58:47.1716733Z ##[debug]System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
2017-12-12T23:58:47.2192203Z ##[debug]LoaderExceptions[0]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2017-12-12T23:58:47.2210664Z ##[debug]LoaderExceptions[1]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceBus, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2017-12-12T23:58:47.2229094Z ##[debug]LoaderExceptions[2]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2017-12-12T23:58:47.2246833Z ##[debug]LoaderExceptions[3]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2017-12-12T23:58:47.2269068Z ##[debug]LoaderExceptions[4]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2017-12-12T23:58:47.2287470Z ##[debug]LoaderExceptions[5]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2017-12-12T23:58:47.2306637Z ##[debug]LoaderExceptions[6]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2017-12-12T23:58:47.2332409Z ##[debug]LoaderExceptions[7]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.16.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2017-12-12T23:58:47.2350592Z ##[debug]Testing whether type can be loaded: 'Microsoft.VisualStudio.Services.Client.VssOAuthCredential'
2017-12-12T23:58:47.2374122Z ##[debug]The type was loaded successfully.
2017-12-12T23:58:47.2411530Z ##[debug]Leaving Get-OMType.
2017-12-12T23:58:47.4180382Z ##[debug]Leaving Get-VssCredentials.
2017-12-12T23:58:47.4211627Z ##[debug]Entering Get-OMType.
2017-12-12T23:58:47.4229467Z ##[debug] TypeName: 'Microsoft.TeamFoundation.WorkItemTracking.WebApi.WorkItemTrackingHttpClient'
2017-12-12T23:58:47.4248904Z ##[debug] OMKind: 'WebApi'
2017-12-12T23:58:47.4265841Z ##[debug] OMDirectory: ''
2017-12-12T23:58:47.4283965Z ##[debug] Require: 'True'
2017-12-12T23:58:47.4306487Z ##[debug]Defaulted OM directory to: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716'
2017-12-12T23:58:47.4326469Z ##[debug]Testing whether type can be loaded: 'Microsoft.TeamFoundation.WorkItemTracking.WebApi.WorkItemTrackingHttpClient'
2017-12-12T23:58:51.6686558Z ##[debug]The type was not loaded.
2017-12-12T23:58:51.6709340Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.TeamFoundation.WorkItemTracking.WebApi.WebApi.dll'
2017-12-12T23:58:51.6745163Z ##[debug]Not found.
2017-12-12T23:58:51.6751477Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.TeamFoundation.WorkItemTracking.WebApi.dll'
2017-12-12T23:58:51.6771961Z ##[debug]Loading assembly: D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.TeamFoundation.WorkItemTracking.WebApi.dll
2017-12-12T23:58:51.6865285Z ##[debug]Testing whether type can be loaded: 'Microsoft.TeamFoundation.WorkItemTracking.WebApi.WorkItemTrackingHttpClient'
2017-12-12T23:58:51.6883284Z ##[debug]The type was loaded successfully.
2017-12-12T23:58:51.6903847Z ##[debug]Leaving Get-OMType.
2017-12-12T23:58:51.6923468Z ##[debug]Constructing HTTP client.
2017-12-12T23:58:52.0582856Z ##[debug]Leaving Get-VssHttpClient.
2017-12-12T23:58:52.0615350Z ##[debug]Entering Get-VssHttpClient.
2017-12-12T23:58:52.0634983Z ##[debug] TypeName: 'Microsoft.TeamFoundation.Build.WebApi.BuildHttpClient'
2017-12-12T23:58:52.0669987Z ##[debug]SYSTEM_TEAMFOUNDATIONCOLLECTIONURI: 'https://intergen.visualstudio.com/'
2017-12-12T23:58:52.0695168Z ##[debug]Entering Get-VssCredentials.
2017-12-12T23:58:52.0712264Z ##[debug] OMDirectory: ''
2017-12-12T23:58:52.0737461Z ##[debug]ENDPOINT_URL_SystemVssConnection: 'https://intergen.visualstudio.com/'
2017-12-12T23:58:52.0759670Z ##[debug]ENDPOINT_AUTH_SystemVssConnection: '********'
2017-12-12T23:58:52.0785475Z ##[debug]ENDPOINT_DATA_SystemVssConnection (empty)
2017-12-12T23:58:52.0808759Z ##[debug]Entering Get-OMType.
2017-12-12T23:58:52.0834432Z ##[debug] TypeName: 'Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential'
2017-12-12T23:58:52.0850313Z ##[debug] OMKind: 'WebApi'
2017-12-12T23:58:52.0867791Z ##[debug] OMDirectory: ''
2017-12-12T23:58:52.0887663Z ##[debug]Defaulted OM directory to: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716'
2017-12-12T23:58:52.0904395Z ##[debug]Testing whether type can be loaded: 'Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential'
2017-12-12T23:58:52.0943564Z ##[debug]The type was not loaded.
2017-12-12T23:58:52.0992487Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.OAuth.WebApi.dll'
2017-12-12T23:58:52.0997534Z ##[debug]Not found.
2017-12-12T23:58:52.1070286Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.OAuth.dll'
2017-12-12T23:58:52.1290485Z ##[debug]Not found.
2017-12-12T23:58:52.1298630Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.WebApi.dll'
2017-12-12T23:58:52.1299303Z ##[debug]Loading assembly: D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.WebApi.dll
2017-12-12T23:58:52.1299881Z ##[debug]Testing whether type can be loaded: 'Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential'
2017-12-12T23:58:52.1300311Z ##[debug]The type was not loaded.
2017-12-12T23:58:52.1300728Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.VisualStudio.Services.dll'
2017-12-12T23:58:52.1301250Z ##[debug]Not found.
2017-12-12T23:58:52.1343442Z ##[debug]Leaving Get-OMType.
2017-12-12T23:58:52.1349898Z ##[debug]Entering Get-OMType.
2017-12-12T23:58:52.1369810Z ##[debug] TypeName: 'Microsoft.VisualStudio.Services.Client.VssOAuthCredential'
2017-12-12T23:58:52.1385571Z ##[debug] OMKind: 'WebApi'
2017-12-12T23:58:52.1402001Z ##[debug] OMDirectory: ''
2017-12-12T23:58:52.1422533Z ##[debug] Require: 'True'
2017-12-12T23:58:52.1439730Z ##[debug]Defaulted OM directory to: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716'
2017-12-12T23:58:52.1472864Z ##[debug]Testing whether type can be loaded: 'Microsoft.VisualStudio.Services.Client.VssOAuthCredential'
2017-12-12T23:58:52.1494293Z ##[debug]The type was loaded successfully.
2017-12-12T23:58:52.1512953Z ##[debug]Leaving Get-OMType.
2017-12-12T23:58:52.1541357Z ##[debug]Leaving Get-VssCredentials.
2017-12-12T23:58:52.1562734Z ##[debug]Entering Get-OMType.
2017-12-12T23:58:52.1580256Z ##[debug] TypeName: 'Microsoft.TeamFoundation.Build.WebApi.BuildHttpClient'
2017-12-12T23:58:52.1596562Z ##[debug] OMKind: 'WebApi'
2017-12-12T23:58:52.1613392Z ##[debug] OMDirectory: ''
2017-12-12T23:58:52.1630313Z ##[debug] Require: 'True'
2017-12-12T23:58:52.1647565Z ##[debug]Defaulted OM directory to: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716'
2017-12-12T23:58:52.1664300Z ##[debug]Testing whether type can be loaded: 'Microsoft.TeamFoundation.Build.WebApi.BuildHttpClient'
2017-12-12T23:58:52.1694626Z ##[debug]The type was not loaded.
2017-12-12T23:58:52.1711461Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.TeamFoundation.Build.WebApi.WebApi.dll'
2017-12-12T23:58:52.1734866Z ##[debug]Not found.
2017-12-12T23:58:52.1752304Z ##[debug]Testing leaf path: 'D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.TeamFoundation.Build.WebApi.dll'
2017-12-12T23:58:52.1771487Z ##[debug]Loading assembly: D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\Microsoft.TeamFoundation.Build.WebApi.dll
2017-12-12T23:58:52.1888850Z ##[debug]Testing whether type can be loaded: 'Microsoft.TeamFoundation.Build.WebApi.BuildHttpClient'
2017-12-12T23:58:52.1910608Z ##[debug]The type was loaded successfully.
2017-12-12T23:58:52.1933187Z ##[debug]Leaving Get-OMType.
2017-12-12T23:58:52.1951306Z ##[debug]Constructing HTTP client.
2017-12-12T23:58:52.1976234Z ##[debug]Leaving Get-VssHttpClient.
2017-12-12T23:58:52.1997664Z ##[debug]GetBuildWorkItemsRefsAsync c2efa575-f4ae-4d93-a2bc-ca4989d737bd 18347
2017-12-12T23:58:56.7834638Z ##[debug]Loop workItemsRefs
2017-12-12T23:58:56.9345565Z ##[debug]Found WorkItemRef: 47088
2017-12-12T23:58:57.0903859Z ##[debug]Found WorkItem: 47088
2017-12-12T23:58:57.0933757Z Updating WorkItem 47088
2017-12-12T23:58:57.1024066Z ##[debug]Found Kanban Lane: 
2017-12-12T23:58:57.1050880Z ##[debug]Found KanbanColumn: 
2017-12-12T23:58:57.1141552Z ##[debug]Found KanbanDoneColumn: 
2017-12-12T23:58:57.1362196Z ##[debug]Patch: /fields/System.State Completed
2017-12-12T23:58:57.4229876Z You cannot call a method on a null-valued expression.
2017-12-12T23:58:57.4262030Z    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
2017-12-12T23:58:57.4262337Z    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
2017-12-12T23:58:57.4262537Z    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2017-12-12T23:58:57.4262706Z    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2017-12-12T23:58:57.4262865Z    at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
2017-12-12T23:58:57.4263035Z    at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
2017-12-12T23:58:57.4263201Z    at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
2017-12-12T23:58:57.4263512Z    at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
2017-12-12T23:58:57.4263740Z    at System.Management.Automation.CommandProcessorBase.Complete()
2017-12-12T23:58:57.4696378Z ##[debug]Leaving D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\task.ps1.
2017-12-12T23:58:57.9439343Z ##[debug]Caught exception from task script.
2017-12-12T23:58:57.9473751Z ##[debug]Error record:
2017-12-12T23:58:58.1213207Z ##[debug]D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\task.ps1 : Cannot validate argument on parameter 'Result'. The argument "Error updating workitems" does not belong to the set "Succeeded,SucceededWithIssues,Failed,Cancelled,Skipped" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
2017-12-12T23:58:58.1223711Z ##[debug]At line:1 char:1
2017-12-12T23:58:58.1235223Z ##[debug]+ . 'd:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1 ...
2017-12-12T23:58:58.1247109Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-12-12T23:58:58.1259269Z ##[debug]    + CategoryInfo          : InvalidData: (:) [task.ps1], ParameterBindingValidationException
2017-12-12T23:58:58.1270093Z ##[debug]    + FullyQualifiedErrorId : ParameterArgumentValidationError,task.ps1
2017-12-12T23:58:58.1281755Z ##[debug] 
2017-12-12T23:58:58.1300940Z ##[debug]Script stack trace:
2017-12-12T23:58:58.1344742Z ##[debug]at <ScriptBlock>, D:\a\_tasks\WorkItemUpdater_7164116a-ed17-48be-9c53-b440b2b1dd2e\1.4.716\task.ps1: line 279
2017-12-12T23:58:58.1356291Z ##[debug]at <ScriptBlock>, <No file>: line 1
2017-12-12T23:58:58.1367681Z ##[debug]at <ScriptBlock>, <No file>: line 22
2017-12-12T23:58:58.1379711Z ##[debug]at <ScriptBlock>, <No file>: line 18
2017-12-12T23:58:58.1390923Z ##[debug]at <ScriptBlock>, <No file>: line 1
2017-12-12T23:58:58.1408415Z ##[debug]Exception:
2017-12-12T23:58:58.1552275Z ##[debug]System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'Result'. The argument "Error updating workitems" does not belong to the set "Succeeded,SucceededWithIssues,Failed,Cancelled,Skipped" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument "Error updating workitems" does not belong to the set "Succeeded,SucceededWithIssues,Failed,Cancelled,Skipped" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
2017-12-12T23:58:58.1563895Z ##[debug]   at System.Management.Automation.ValidateSetAttribute.ValidateElement(Object element)
2017-12-12T23:58:58.1575085Z ##[debug]   at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
2017-12-12T23:58:58.1586581Z ##[debug]   --- End of inner exception stack trace ---
2017-12-12T23:58:58.1597819Z ##[debug]   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
2017-12-12T23:58:58.1609646Z ##[debug]   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
2017-12-12T23:58:58.1624056Z ##[debug]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2017-12-12T23:58:58.1634548Z ##[debug]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2017-12-12T23:58:58.1647040Z ##[debug]   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
2017-12-12T23:58:58.1658362Z ##[debug]   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
2017-12-12T23:58:58.1669590Z ##[debug]   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
2017-12-12T23:58:58.1681144Z ##[debug]   at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
2017-12-12T23:58:58.1693858Z ##[debug]   at System.Management.Automation.CommandProcessorBase.Complete()
2017-12-12T23:58:58.2010326Z ##[error]Cannot validate argument on parameter 'Result'. The argument "Error updating workitems" does not belong to the set "Succeeded,SucceededWithIssues,Failed,Cancelled,Skipped" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
2017-12-12T23:58:58.2010705Z ##[debug]Processed: ##vso[task.logissue type=error]Cannot validate argument on parameter 'Result'. The argument "Error updating workitems" does not belong to the set "Succeeded,SucceededWithIssues,Failed,Cancelled,Skipped" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
2017-12-12T23:58:58.2011592Z ##[debug]Processed: ##vso[task.complete result=Failed]
2017-12-12T23:58:58.2421921Z ##[section]Finishing: Link Build to Tasks

@BlueBasher
Copy link
Owner

A new version has been published with the changes from #20 With this change the extension can also be used in Agile Template projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants