InvalidProgramException in Team Foundation Server Sample

我的未来我决定 提交于 2020-01-25 07:54:06

问题


Hi I get an System.InvalidProgramException while trying to run the Example Project called "C# Example.WorkItemBrowser". The Exception also apears when I try to execute these lines:

TeamFoundationServer tfserver = new TeamFoundationServer("http://localhost:8085");
tfserver.EnsureAuthenticated();
WorkItemStore store = new WorkItemStore(tfserver);
Console.WriteLine(store.Projects.Count);

I'm using the 2008 Visual Studio SDK for that.

PEverify for the assembly Microsoft.TeamFoundation.WorkItemTracking.Client.dll

got this otuput:

[MD]: Error: Value class has neither fields nor size parameter. [token:0x020000B3]
[MD]: Error: Value class has neither fields nor size parameter. [token:0x020000BF]
[MD]: Error: Value class has neither fields nor size parameter. [token:0x020000C4]
3 Error(s) Verifying Microsoft.TeamFoundation.WorkItemTracking.Client.dll

A fresh download and install of the SDK as well as deinstall and install as well as installing .net 3.5 sp1 again didn't help.

Is something wrong with the description of my problem or did it just not happen anywhere else?


回答1:


This solved my problem: http://blogs.msdn.com/b/jianges/archive/2008/03/28/tfs-sdk-will-cause-invalidprogramexception-while-running-as-64-bit.aspx




回答2:


I just a very similar question here.

Turns out, you have to have Team Explorer installed on the machine you are executing this code on. Are you deploying this to another machine or trying this on a machine that doesn't have Team Explorer installed on it?



来源:https://stackoverflow.com/questions/178619/invalidprogramexception-in-team-foundation-server-sample

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!