asp.net.netasp.net-mvc-3.net-4.0log4net

Trying to integrate PayPal checkout express, using classes\dll provided by PayPal, getting: Could not load file or assembly 'log4net


Using .Net framework 4. I am assuming this log4net version that the PayPal library is dependent on requires an older version or I don't have the file at all? Do I need to get this file somewhere or is there another work around?

Update, after installing latest version of log4net I now get the same error except the file is found this time and says**:

 The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   com.paypal.sdk.profiles.BaseAPIProfile..cctor() +0




Line 23:        {
Line 24:            NVPCallerServices caller = new NVPCallerServices();
Line 25:            **IAPIProfile profile = ProfileFactory.createSignatureAPIProfile();**

code.

Stack Trace: 


[FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.0.30714, Culture=neutral, PublicKeyToken=b32731d11ce58905' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.]
   com.paypal.sdk.profiles.BaseAPIProfile..cctor() +0

[TypeInitializationException: The type initializer for 'com.paypal.sdk.profiles.BaseAPIProfile' threw an exception.]
   com.paypal.sdk.profiles.BaseAPIProfile..ctor() +0
   com.paypal.sdk.profiles.SignatureAPIProfile..ctor() +29
   com.paypal.sdk.profiles.ProfileFactory.createSignatureAPIProfile() +39
   GenerateCodeNVP.ECSetExpressCheckout.ECSetExpressCheckoutCode(String returnURL, String cancelURL, String amount, String paymentType, String currencyCode) in C:\Users\Admin\Documents\Visual Studio 2010\Projects\MyProject\DotNetNVPGenerate\ECSetExpressCheckout.cs:25
   NeoCart.WebUI.Controllers.CheckoutController.Payment() in C:\Users\Admin\Documents\Visual Studio 2010\Projects\MyProject\NeoCart.WebUI\Controllers\CheckoutController.cs:179
   lambda_method(Closure , ControllerBase , Object[] ) +96

 

Solution

  • Log4net is a separate open-source project.

    You can get it from within Visual Studio using NuGet, or you can download it from Apache's website.