I have a C#(Business Logic) and .NET Core project. It was working fine on windows server 2012. I have updated the operating system to windows server 2022. Now I am facing this problem on all the projects where I am referencing Newtonsoft.json. Although on the projects level I checked the referenced Newtonsoft package version is 9.0.0.0.
“An exception of type ‘System.IO.FileLoadException’ occurred in mscorlib.dll but was not handled in user code
Additional information: Could not load file or assembly ‘Newtonsoft.Json, Version=13.0.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)”
On some projects the error is coming as: Additional information: Could not load file or assembly ‘Newtonsoft.Json, Version=9.0.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)
2