如何工作项(VS-团队资源管理器)禁区外的Visual Studio打开? [英] How to open WorkItem (VS-Team Explorer) from outside visual studio?
本文介绍了如何工作项(VS-团队资源管理器)禁区外的Visual Studio打开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用C#代码来打开从外部视觉工作室工作项目。是否可以?
I want to open the workitem from outside visual studio using C# code. is it possible?
我想这一点:
IWorkItemDocument widoc = null;
try
{
string tfsName = "http://rd-tfs-no2:8080/tfs/siproducts";
var projectCollectionUri = new Uri(tfsName);
var projectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(projectCollectionUri, new UICredentialsProvider());
projectCollection.EnsureAuthenticated();
DocumentService docService = (DocumentService)Package.GetGlobalService(typeof(DocumentService));
widoc = docService.GetWorkItem(projectCollection, id,this);
docService.ShowWorkItem(widoc);
}
finally
{
widoc.Release(this);
}
不过,帮助欠即时得到空值docService。
But help less Im getting null value for docService.
有什么好建议?
推荐答案
的包
只有当你在一个Visual Studio插件,工作工作。如果你正在寻找一种方式来显示工作项目,你既可以做到这一点通过字段映射到您的WinForm / WPF应用程序,或者通过脱壳而出于Internet Explorer和传递工作项ID进入网址为基于Web的浏览器。
The Package
only works when you are working on a Visual Studio plug-in. If you're looking for a way to display the work item, you could either do it by mapping fields to your winform/WPF application, or by shelling out to Internet Explorer and passing the work item ID into the URL for the web-based viewer.
这篇关于如何工作项(VS-团队资源管理器)禁区外的Visual Studio打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文