I've installed PayPal using NuGet Install-Package PayPal
I'm then using the code from here to test: https://devtools-paypal.com/guide/pay_paypal
Dictionary<string, string> sdkConfig = new Dictionary<string, string>();
sdkConfig.Add("mode", "sandbox");
string accessToken = new OAuthTokenCredential("XXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXX", sdkConfig).GetAccessToken();
I've put a breakpoint after this to inspect, but when I load up the page i get:
Could not load file or assembly 'PayPal, Version=1.7.3.0, Culture=neutral, PublicKeyToken=5b4afc1ccaef40fb' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'PayPal, Version=1.7.3.0, Culture=neutral, PublicKeyToken=5b4afc1ccaef40fb' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 22:
Line 23: return View();
Line 24: }
Line 25: }
Line 26: }
Source File: c:\users\david\documents\visual studio 2015\Projects\PayPal\PayPal\Controllers\HomeController.cs Line: 24
Assembly Load Trace: The following information can be helpful to determine why the assembly 'PayPal, Version=1.7.3.0, Culture=neutral, PublicKeyToken=5b4afc1ccaef40fb' could not be loaded.
Any help on how to resolve this?
EDIT
I've tried the answers from the link given to the possible duplicate and none of them work for me.