我查看了各种示例,并且很少/没有连接到在线TFS帐户,连接到TFS项目。下面是最后一次尝试的代码,它也没有用。是的,我是VS .Net(C#)的新手。任何方向都非常感谢:
using System;
using System.Collections.ObjectModel;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Framework.Common;
using Microsoft.TeamFoundation.Framework.Client;
namespace TfsApplication
{
class Program
{
static void Main(String[] args)
{
Uri collectionUri = new Uri("https://drmpractice.visualstudio.com");
TfsTeamProjectCollection collection =
new TfsTeamProjectCollection(
collectionUri,
new System.Net.NetworkCredential(@"myEmail@hotmail.com", "MyPassword"));
WorkItemStore workItemStore = collection.GetService<WorkItemStore>();
}
}
}
返回了返回的错误:&#34;密码,端口或项目名称错误&#34;。