[英]TFS C# - Loading workItemStore returns null or type initializer exception
I am trying to load a TFS WorkItemStore through the following method (see below) which is returning a null value for the WorkItemStore. 我正在尝试通过以下方法(请参见下文)加载TFS WorkItemStore,该方法为WorkItemStore返回空值。
TfsTeamProjectCollection teamProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri(tfsServer + "/" + collection));
//Authenticate with current logged on user
teamProjectCollection.Authenticate();
//Setup store and project based on app config settings
workItemStore = teamProjectCollection.GetService<WorkItemStore>();
I have also tried to load the WorkItemStore through the following, however this throws the exception: System.TypeInitializationException 我也尝试通过以下方式加载WorkItemStore,但这会引发异常:System.TypeInitializationException
workItemStore = teamProjectCollection.GetService<WorkItemStore>();
Any help would be appreciated! 任何帮助,将不胜感激!
Thanks, 谢谢,
Chris 克里斯
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.