Upload a file using TFS Client APIs

前端 未结 1 1028
情话喂你
情话喂你 2021-01-25 01:36

I want to upload a file from asp.net webpage to TFS server. Using TFS API I have created bug from my web page - but the bug also needs a file attachement to upload please let me

相关标签:
1条回答
  • 2021-01-25 02:40

    You should be able to simply create an Attachment object and add it to the Attachments collection on the WorkItem before you save it:

    Dim attachment As New Microsoft.TeamFoundation.WorkItemTracking.Client.Attachment("c:\somefile.txt", "My Comment")
    workItem.Attachments.Add(attachment)
    workItem.Save()
    
    0 讨论(0)
提交回复
热议问题