使用D3DotNetAPI的TypeLoadException

时间:2013-08-22 07:00:59

标签: c# wpf windows-phone-7 typeloadexception

我正在尝试使用D3DotNetAPI来创建Windows Phone 7应用程序。

以下是文档的链接:D3DotNetAPI documentation link

我只是想跟踪样本并执行此操作:

D3Explorer explorer = new D3Explorer(Region.EU);

//Career data for Battletag Gaidin#2380
Career myCareer = explorer.GetCareer("Gaidin", 2380);
MessageBox.Show("Has killed "+ myCareer.Kills.Monsters+" monstters, with "+ myCareer.Kills.Elites+" elites.");

我抛出这个例外:

System.TypeLoadException: Could not load type 'System.Runtime.Serialization.ISerializable' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
   at D3DotNetAPI.D3Explorer.TryGetData[T](String url, T& requestedObject)
   at D3DotNetAPI.D3Explorer.GetCareer(String battleTagName, Int32 battleTagCode)
   at d3.MainPage..ctor()

我不确定,但我的例外与this stack overflow answer

类似

PS:同样的示例在Win32应用程序上运行良好。

1 个答案:

答案 0 :(得分:0)

自动回答:

WP中没有ISerializable(WP = .NET框架的一部分)