Loading dll that contains Newtonsoft assembly with reflection error

非 Y 不嫁゛ 提交于 2020-01-24 23:29:05

问题


I'm trying to load an assembly using reflection that uses the ISerializationBinder binder from Newtonsoft, but when the assembly is loaded it throws the following exception:

System.Reflection.ReflectionTypeLoadException: 'Unable to load one or more of the requested types. Could not load type 'Newtonsoft.Json.SerializationBinder' from assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.'

I don't really have a clue of why it could be


回答1:


Well, honestly I'm still confused but I did a clean and then build of the assembly I was trying to load and that seemed to get rid of the old SerializationBinder class.



来源:https://stackoverflow.com/questions/58904011/loading-dll-that-contains-newtonsoft-assembly-with-reflection-error

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