错误 707 Could not load file or assembly ‘Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKe

错误 707 Could not load file or assembly ‘Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

这是一个比较常见的问题,有人直接引用本地程序集,而不是通过NuGet管理包,或者将项目编译到另一个。net版本中。
解决这个问题的最好方法是在项目引用中找到引用并删除它,清理项目,检查DLL是否已经消失,最后使用NuGet重做引用,如下图
在这里插入图片描述