相关疑难解决方法(0)

找不到方法:'Void Newtonsoft.Json.Serialization.DefaultContractResolver.set_IgnoreSerializableAttribute(Boolean)'

我有一个ASP.net MVC应用程序,它使用由xamarin应用程序共享的可移植类库.当我的Web应用程序立即启动时,它会抛出此错误:

 Method not found: 'Void Newtonsoft.Json.Serialization.DefaultContractResolver.set_IgnoreSerializableAttribute(Boolean)'.
Run Code Online (Sandbox Code Playgroud)

我正在使用Structure Map MVC nuget包,它工作正常,直到我引用了PCL库.

它在这行代码中出错:

GlobalConfiguration.Configuration.DependencyResolver = new StructureMapDependencyResolver(container);
Run Code Online (Sandbox Code Playgroud)

我认为它与PCL类和MVC有关,它们都引用了JSON.net.有想法该怎么解决这个吗?我最终重建了我的机器,以确保只有这个版本在GAC中而没有其他地方.

有任何想法吗

c# asp.net-mvc xamarin

9
推荐指数
2
解决办法
2万
查看次数

标签 统计

asp.net-mvc ×1

c# ×1

xamarin ×1