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 know.
我想从asp.net网页上传文件到TFS服务器。使用TFS API我已经从我的网页创建了错误 - 但该错误还需要一个文件附件上传请告诉我。
1 个解决方案
#1
You should be able to simply create an Attachment object and add it to the Attachments collection on the WorkItem before you save it:
在保存之前,您应该能够简单地创建一个Attachment对象并将其添加到WorkItem上的Attachments集合中:
Dim attachment As New Microsoft.TeamFoundation.WorkItemTracking.Client.Attachment("c:\somefile.txt", "My Comment")
workItem.Attachments.Add(attachment)
workItem.Save()
#1
You should be able to simply create an Attachment object and add it to the Attachments collection on the WorkItem before you save it:
在保存之前,您应该能够简单地创建一个Attachment对象并将其添加到WorkItem上的Attachments集合中:
Dim attachment As New Microsoft.TeamFoundation.WorkItemTracking.Client.Attachment("c:\somefile.txt", "My Comment")
workItem.Attachments.Add(attachment)
workItem.Save()