0
votes

I try to build the Akka.NET as build all ,but there is a error:

CS0433: Configuration\Hocon\HoconObject.cs(47,10): The type 'JsonIgnoreAttribute' exists in both 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'

I don't know why the vs2015 will to find the 'Newtonsoft.Json' in foler C:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\ not the reference path ..\..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll.

Here is the akka.net project file Akka.csproj.

Please help me to solve the problem.Thanks

--------------------Update---------------

I found the Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll as follow: enter image description here

Is there a problem in Nuget now?

2
Have you try Update-Package Newtonsoft.Json ?Krunal Mevada
Have you tried to clean the solution and after rebuild it? this iften Restore the Nuget-Packages. If not, Enter on Manage Nuget Packages and update it manually.soydachi
@dachibox Akka.NET has solve the problem in the latest source code.huoxudong125

2 Answers

0
votes

I got similar kind of error once and Solved this by renaming the Dll and adding it to reference.

The other way around is you copy the DLL version to the bin of the project and then add it to reference.

Each time you are building as you referred, visual studio is downloading the latest package and hence this conflict arises.

I would suggest you to go for the second approach.

Thanks, Anil

0
votes

I had the same issue, what fixed it for me: Delete bin and obj folders, Uninstall-Package Akka, then Install-Package Newtonsoft.Json to latest version (8.0+) Then, Install-Package Akka, which will pick up the latest version of Newtonsoft.Json and be happy :).