使用TFS客户端API上传文件 [英] Upload a file using TFS Client APIs

查看:180
本文介绍了使用TFS客户端API上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要上传从asp.net网页,TFS服务器的文件。
使用TFS API,我创建的bug从我的网页 - 但这个错误也需要一个文件attachement上传,请让我知道。

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.

推荐答案

您应该能够简单地创建一个附件对象,并将其添加到工作项目的附件收集保存它之前:

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()

这篇关于使用TFS客户端API上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆