0
votes

I need to execute ##vso[task.addattachment]value power shell command from my VSTS extension code to attach a data file to build result. I'm using TypeScript to develop the build task. Please share any dev sample codes to achieve this using vss-task library.

1
The command must be ran in a build process, is your extension a build task? - Eddie Chen - MSFT
@Eddie, Yes, Its a build task. Will it work if I execute following? 'console.log("##vso[task.addattachment type=attype;name=summarypagedata;]c:/myfolder/summarydata.txt");' - Bandara

1 Answers

1
votes

Yes, just as I indicated in your previous question, you just need to write out the command to build console during the build process. For Typescript, you can use console.log() command to do this.