Try our conversational search powered by Generative AI!

Cannot find a type of name Mediachase.Commerce.Orders.IPaymentGateway within the plugins or the common library


I have just applied Patch 5 to my CMS site and followed the instructions here but I still get the error "Cannot find a type of name Mediachase.Commerce.Orders.IPaymentGateway within the plugins or the common library"

I believe this was meant to be fixed with Patch 5.  have I missed something??


Feb 17, 2014 17:17


I tested with Patch 5 and it worked fine. You can try to uninstall Patch 4 (uninstall EPiServer.CommerceManager package and dependent packages) and then re-apply Patch 5 to see if it works.

Steps (for future visitors)

- Open Commerce Manager Update project in Visual Studio 2010 or later

- Right click, choose "Manage Nuget Packages", click on Installed. Choose EPiServer.CommerceManager, click Uninstall, then select "Yes" on prompt about uninstall dependent packages)

- Wait for the uninstall to complete

- Install patch 5.



Feb 18, 2014 4:50

I have tried removing and re-adding the patch to CommerceManager to no avail, so I tried the same on an install on which Commerce Manager had never been updated to Patch 4 and I still get the same issue.

Feb 18, 2014 15:22


The problem is (most likely) caused as Commerce manager cannot load Mediachase.Commerce.dll properly via reflection. The root causes are often missing or wrong version of depended assemblies (EPiServer.Events, EPiServer.Framework.dll...). For Patch 5, EPiServer framework should have 7.5.1000.0 version, while Commerce has 7.5.1001.0 version. Please check that and make sure those assemblies are configured redirect properly.



Edited, Feb 18, 2014 15:37

For patch 5 my EPiServer.Framework has the version 7.5.1002.0 while Mediachase.Commerce has 7.5.1000.0. A quick look at the nuget feed suggests there is no version 7.5.1001.0 available for Commerce.


Feb 19, 2014 8:40


My mistake about Commerce, it's another internal version - .1000.0 should be fine. Do you see Framework's assemblies are configured binding redirect correctly in web.config?


Feb 19, 2014 8:53

You can also try this:

- Copy this and save as PaymentGatewayCheck.aspx, in root folder of Commerce Manager:

<%@ Page Language="C#" EnableViewState="false" AutoEventWireup="true" %>

<!DOCTYPE html>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Reflection" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="Mediachase.Commerce.Orders" %>
<html xmlns="">
<head runat="server">
<title>Payment gateway check</title>
<meta http-equiv="refresh" content="5" />
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
Assembly assembly = Assembly.LoadFrom(Path.Combine(Server.MapPath("~"), "bin", "Mediachase.Commerce.dll"));
Response.Write(String.Format("<h3>{0}</h3>", assembly.FullName));
Type [] types = assembly.GetTypes();
List<Type> typeslist = new List<Type>(types);
if (typeslist.Contains(typeof(IPaymentGateway)))
Response.Write("<h3>Congrats! Your site is fine with IPaymentGateway</h3>");
catch (ReflectionTypeLoadException ex)
Response.Write("<h1>Oops, problem with your site:</h1>");
foreach (Exception exception in ex.LoaderExceptions)


- Access to http://<yoursite>/PaymentGatewayCheck.aspx and see what is printed.

- Paste the log here if you still need help :)



Edited, Feb 19, 2014 9:32

I have checked the web config and the DLL version numbers and they all seem correct, with the possible exception of EPiServer.Common.* which are 7.5.446.0.

I also created the file as you suggested and that says:

Mediachase.Commerce, Version=7.5.1000.0, Culture=neutral, PublicKeyToken=6e58b501b34abce3

Congrats! Your site is fine with IPaymentGateway

I'm at a loss as to why I am still receiving the error when I try to add a new payment type

Feb 19, 2014 11:22


Can you zip your bin folder and configs file (web.config and all things in Configs folder) and send to me (quma at ). I can help to take a look.



Edited, Feb 19, 2014 11:26


I was able to figure out problem. EPiServer Commerce 7.5.1000.0 compiled with EPiServer Framework 7.5.1000.0. Everything should work if assembly redirect was correct, except for reflection. They need to be able to load exactly the dependencies were compiled with.

The workaround should be:

- Uninstall EPiServer Framework 7.5.1002.0 (effectively remove EPiServer nugets)

- Run this to install EPiServer Framework 7.5.1000.0:

install-package episerver.framework -Version 7.5.1000.0

- Install EPiServer Commerce 7.5.1000.0

Retry if the problem is fixed.

We will take a look into this problem to see if we can improve it.



Edited, Feb 19, 2014 12:19

Whenever I install EPiServer.CommerceManager 7.5.1000.0 it automatically updates to EPiServer.Framework 7.5.1002.0.  Can the nuget package for this version of CommerceManager be restricted to Framework 7.5.1000.0?

Feb 19, 2014 12:30


I was able to install EPiServer.CommerceManager 7.5.1000.0 without updating the EPiServer.Framework package. If you only got problem with EPiServer.CommerceManager, the workaround is 

- Follow above instruction to install EPiServer.Commerce 7.5.1000.0

- Run this to install EPiServer.CommerceManager:

install-package -ignoredependencies episerver.commercemanager

FYI, the bug related to your issue has been fixed completely. We missed out the case when version of Commerce and its dependencies do not match. For next iteration, it would require no workaround to solve this.

Sorry for this inconvenient. 





Feb 20, 2014 4:06

Hi Quan

  The nuget package for EPiServer.Commerce is actually the package that updates Framework to 7.5.1002.0, so with the instructions you have given I am still having the same issues.




Feb 20, 2014 9:48


You can try to do this:

- Backup your Commerce manager folder.

- Overwrite CommerceManagerUpdate.csproj with the original one, keep packpages.config

- Delete EPiServer.Framework.7.5.1002.0 and EPiServer.CMS.Core.7.5.1002.0 folder in /packages

- Make sure your packages.config is something like this:

<?xml version="1.0" encoding="utf-8"?>
  <package id="Castle.Core" version="3.2.0" targetFramework="net40" />
  <package id="Castle.Windsor" version="3.2.0" targetFramework="net40" />
  <package id="Common.Logging" version="1.2.0" targetFramework="net40" />
  <package id="Common.Logging.EntLib" version="1.2.0" targetFramework="net40" />
  <package id="Common.Logging.Log4Net" version="1.2.0" targetFramework="net40" />
  <package id="Common.Logging.NLog" version="1.2.0" targetFramework="net40" />
  <package id="EPiServer.CMS.Core" version="7.5.1000.0" targetFramework="net40" />
  <package id="EPiServer.Commerce" version="7.5.1000.0" targetFramework="net40" />
  <package id="EPiServer.CommerceManager" version="7.5.1000.0" targetFramework="net40" />
  <package id="EPiServer.CommonFramework" version="7.5.446.1" targetFramework="net40" />
  <package id="EPiServer.Framework" version="7.5.1000.0" targetFramework="net40" />
  <package id="log4net" version="1.2.10" targetFramework="net40" />
  <package id="Lucene.Net" version="3.0.3" targetFramework="net40" />
  <package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net40" />
  <package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net40" />
  <package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net40" />
  <package id="Microsoft.Web.Infrastructure" version="" targetFramework="net40" />
  <package id="Newtonsoft.Json" version="5.0.8" targetFramework="net40" />
  <package id="SharpZipLib" version="0.86.0" targetFramework="net40" />
  <package id="structuremap" version="" targetFramework="net40" />

(Note the version of Framework and CMS core)

- Open project in VS2010 or later, open Package Manager Console windows, point to EPiServer feed, and run this:

 update-package -reinstall

- Rebuild and see if it works.

If it not, then I can send you the bin folder and web.config which you can apply to your site to get it works :)



Edited, Feb 20, 2014 10:05


  This has once again updated to Framework and CMS.Core 7.5.1002.0 as the nuget package for EPiServer.Commerce specifies >= 7.5.1000.0 < 7.6 for those packages so nuget appears to automatically update to the latest version within that range.



Feb 20, 2014 10:37

I have just done an update to Patch 6 and I am still getting this error.  Everything appears to have updated correctly via nuget, the file versions look correct, the Web.config looks correct.

Any ideas anyone??

Feb 24, 2014 11:19


Sorry to say that the bug fix was not included in Patch 6. We need to take more reviews to make sure it's completely gone. It'll be included in Patch 7 if our QAs are happy with the fix.

Thank you for your understanding.



Feb 24, 2014 11:32

Ah, ok thanks!!

Feb 24, 2014 11:33
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.