Could not load file or assembly 'PayPalCoreSDK'

2

I have 2 webapp projects that work perfectly with this assembly.

I've tried everything, copy the BIN folder, delete, make a rebuild.

Search for things in the GAC, remove and add references again, with NUGET without NUGET, copy from the folder of projects that work.

My error was that on the first try I added the reference through the nuget manager rather than simply copying the DLLs from the projects that work

Now there is something causing version error.

System.IO.FileLoadException: Could not load file or assembly 'PayPalCoreSDK, Version = 1.7.0.0, Culture = neutral, PublicKeyToken = 5b4afc1ccaef40fb' or one of its dependencies. The localized assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

How to clear this mess and fix those references?

Everything is the same as the other 2 projects that work, even code, even web.config.

I do not know where else to look for solutions.

PayPalMerchantSDK (2.16.204.0)

Dependencies: PayPalCoreSDK (1.7.1.0) - Newtonsoft.Json (9.0.0.0)

c#
asp.net
visual-studio-2015
web-applications
.net-assembly
asked on Stack Overflow May 23, 2017 by Fabio Alves Francelino • edited May 23, 2017 by Fabio Alves Francelino

3 Answers

0

Did you check the .net framework version in same as your other 2 projects?

0

After many attempts I managed to make the project work.

However, I had to work with older versions of PayPalCoreSDK and Newtonsof.Json.

Now I will try to adjust the versions to see if I can align all the projects.

But the references are confusing and if it gives problem it seems that only NUGET can refresh DLLs properly

Manual settings in the BIN folder do not work much less in web.config.

0

I encounter this error as well. I was able to fix it by just downgrading the version of the PaypalCoreSDK to the previous one.

answered on Stack Overflow Nov 27, 2018 by Andrew

User contributions licensed under CC BY-SA 3.0