cake-contrib/Cake.Json

Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0

johnxjcheng opened this issue · 5 comments

Hey Redth,
When trying to install and use Cake.Json, I got the following error. Do I need to add any reference, redirect or waiting for the next update?

Thanks,
JC

PS C:\temp\cake-build\example-master> .\build.ps1
All packages listed in packages.config are already installed.
Addin: Cake.FileHelpers, adding Reference C:/temp/cake-build/example-master/tools/Addins/Cake.FileHelpers/lib/net45/Cake.FileHelpers.dll
Attempting to resolve dependency 'Cake.Core (≥ 0.5.5)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 7.0.1)'.
Installing 'Cake.Core 0.5.5'.
Successfully installed 'Cake.Core 0.5.5'.
Installing 'Newtonsoft.Json 7.0.1'.
Successfully installed 'Newtonsoft.Json 7.0.1'.
Installing 'Cake.Json 1.0.0'.
Successfully installed 'Cake.Json 1.0.0'.
Addin: Cake.Json, adding Reference C:/temp/cake-build/example-master/tools/Addins/Cake.Json/lib/net45/Cake.Json.dll
Addin: Cake.Json, adding Reference C:/temp/cake-build/example-master/tools/Addins/Cake.Json/lib/net45/Newtonsoft.Json.dll
Error: Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

I found a workaround by copy Newtonsoft.Json.dll to the same folder of Cake.exe.

JC

JC,

I had the same issue (see #1). I was able to fix it by upgrading to the latest version of cake by referencing build 0.6.0 in the packages.config used during the bootstrap process.

HTH,
Mark

That's good to know. Thanks!

JC

Sent from Outlook Mobile

On Sun, Nov 29, 2015 at 5:21 AM -0800, "Mark Ingalls" notifications@github.com wrote:

JC,

I had the same issue (see #1). I was able to fix it by upgrading to the latest version of cake by referencing build 0.6.0 in the packages.config used during the bootstrap process.

HTH,
Mark


Reply to this email directly or view it on GitHub:
#2 (comment)

I get this error today as i integrated Cake.Json as Addin:

Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Installing addins...
Compiling build script...
Error: (2456,29): error CS0433: The type 'Newtonsoft.Json.Linq.JObject' exists in both 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and 'Newtonsoft.Json, V
ersion=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'

Can someone help me?

gep13 commented

I am going to go ahead and close this out, as I believe that these issues have been addressed.