meta4
meta4

Reputation: 736

Could not load file or assembly 'Newtonsoft.Json' on specific machine

I have a solution which runs pretty nice on 2 machines, but when I try to deploy same solution on specific machine which runs Windows Server 2012(irrelevant because another two instances also run on Windows Server 2012) it keep me throwing: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.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) I've checked all my dependencies and they seem to be ok, may it be something with ASP.NET on machine?

*All my project use Newtonsoft.Json, Version=9.0.1

Upvotes: 0

Views: 853

Answers (1)

trailmax
trailmax

Reputation: 35126

Newtonsoft.Json is not part of .Net framework. You need to provide it yourself.

The exception you see means either:

  1. Newtonsoft.json.dll is not part of your deployment and 2 machines where your solution works have this dll somehow installed
  2. You have 2 conflicting versions of this dll and the solution does not know which one to pick.

So first check that this dll is present in your bin folder. If not, put it there.

Upvotes: 2

Related Questions