We have .NET Framework 4.6.2 on server. Our project uses the latest version of Newtonsoft.Json. When I try to run our project it fails with the following error:
我们在服务器上安装了.NET Framework 4.6.2。我们的项目使用最新版本的Newtonsoft.Json。当我尝试运行我们的项目时,它失败并出现以下错误:
Could not load file or assembly 'System.Runtime.Serialization.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
I tried to extend web.config with runtime assemblyBinding - no results.
我尝试使用运行时assemblyBinding扩展web.config - 没有结果。
Any ideas ?
有任何想法吗 ?
2 个解决方案
#1
3
Please verify if the version of System.Runtime.Serialization currently is 4.1.1.
请验证System.Runtime.Serialization的版本当前是否为4.1.1。
Or try to install via nuget package console by using this command:
或者尝试使用以下命令通过nuget包控制台安装:
Install-Package System.Runtime.Serialization.Primitives -Version 4.1.0
#2
1
You could try this to find what actually causes the issue: https://marketplace.visualstudio.com/items?itemName=MykolaTarasyuk.ReferenceConflictsAnalyser
您可以尝试这样来查找实际导致问题的原因:https://marketplace.visualstudio.com/items?itemName = MykolaTarasyuk.ReferenceConflictsAnalyser
#1
3
Please verify if the version of System.Runtime.Serialization currently is 4.1.1.
请验证System.Runtime.Serialization的版本当前是否为4.1.1。
Or try to install via nuget package console by using this command:
或者尝试使用以下命令通过nuget包控制台安装:
Install-Package System.Runtime.Serialization.Primitives -Version 4.1.0
#2
1
You could try this to find what actually causes the issue: https://marketplace.visualstudio.com/items?itemName=MykolaTarasyuk.ReferenceConflictsAnalyser
您可以尝试这样来查找实际导致问题的原因:https://marketplace.visualstudio.com/items?itemName = MykolaTarasyuk.ReferenceConflictsAnalyser