報錯:

解決辦法:將原有的
Newtonsoft.Json.dll移除掉,再將Package.config里面的版本信息注釋掉,通過NuGet程序管理重新安裝,然后重新生成就行了。
如果不行也可以在web.config里面加上
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
步驟截圖:
1、

2、


3、

4、

