今晚在尝试使用友盟最新的社交分享SDK时,按照官方Demo,并未做多少多少改动,就是去除了对微信、脸书和推特的分享。然后运行之后就一直报错 :
{System.IO.FileLoadException: Could not load file or assembly 'System.Xml.XPath, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Xml.XPath, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)
at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)}
在项目中使用了nuget获取的HTML Agility Pack 和友盟分享SDK。
找到了一样的错误:http://ylad.codeplex.com/discussions/430095 ( 示例 ),是因为System.Xml.XPath 冲突了。好吧,他是建议使用HTML Agility Pack时不要使用System.Xml.XPath,转而使用LinqToXml替代。 目前我并没有继续往下做。