NopCommerce Nop.Core conflicts with DLL problem

So I started working on an existing project at work in NopCommerence and I accidentally added the DLL Newtonsoft.Json to the Nop.Core project, since then the project keeps crashing randomly giving me the error:

Could not load file or assembly 'Newtonsoft.Json, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed' or one of its dependencies. Installed assembly manifest definition did not map assembly reference. (Exception from HRESULT: 0x80131040)

Could not load file or assembly 'Newtonsoft.Json, Version = 4.5.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed' or one of its dependencies. Installed assembly manifest definition did not map assembly reference. (Exception from HRESULT: 0x80131040)

enter image description here

I immediately removed the reference from the project, so now there is no reference to this DLL in the Nop.Core project.

But there is some code in the project that is looking for a link:

enter image description here

When we get to this plugin, it works here:

enter image description here

I have no idea where to even look to solve this, it looks like it is trying to load two different DLL versions and when I google it says to update, although NuGet and I did it and nothing solved it.

+3


source to share


1 answer


So you removed the link, but what about the actual dll file? It looks like something "detects" it at runtime and exists on your disk somewhere, and the application finds it.

It's hard to figure out what to suggest, but try to figure out where the app is looking for the plugin files, then look in that directory and delete the Json. You can also try to simply delete all bin and obj directories in the whole solution, as they will be recreated by the next build. Also look in the directory packages

at the root of your solution, you can find a copy of the Json package lingering there. If you have definitely uninstalled it using NuGet, then uninstall it with packages

.



Make a backup before launching, just in case my suggestions are full of junk; -)

0


source







All Articles