EPiServer.Framework.Initialization.InitializationException: 'Cannot resolve dependencies for the following module(s)



I'm trying to setup InitializationEngine for integration tests, but got the following error when invoking Initialize method on the engine:

EPiServer.Framework.Initialization.InitializationException: 'Cannot resolve dependencies for the following module(s) 

I simplified the code to the minimum and it is as below:

public class Test
private InitializationEngine _engine;

public void __() { }

public void Setup()
_engine = new InitializationEngine((IEnumerable<IInitializableModule>)null, HostType.TestFramework);

public void TearDown()
if (_engine != null && _engine.InitializationState == InitializationState.Initialized) _engine.Uninitialize();

The forceBinFolderScan flag in configuration file in episerver.framework node is set to true:

 <scanAssembly forceBinFolderScan="true" />

Episerver package versions (target = net461):

  • EPiServer.CMS version="11.11.3"
  • EPiServer.CMS.AspNet version="11.11.3"
  • EPiServer.CMS.Core version="11.11.3"
  • EPiServer.CMS.TinyMce version="2.8.0"
  • EPiServer.CMS.UI version="11.19.1"
  • EPiServer.CMS.UI.AspNetIdentity version="11.19.1"
  • EPiServer.CMS.UI.Core version="11.19.1"
  • EPiServer.Commerce version="13.3.1"
  • EPiServer.Commerce.Core version="13.3.1"
  • EPiServer.Commerce.UI version="13.3.1"
  • EPiServer.Commerce.UI.CustomerService version="13.3.1"
  • EPiServer.Commerce.UI.ManagerIntegration version="13.3.1"
  • EPiServer.Framework version="11.11.3"
  • EPiServer.Framework.AspNet version="11.11.3"
  • EPiServer.Logging.Log4Net version="2.2.2"
  • EPiServer.Personalization.Commerce version="3.1.2"
  • EPiServer.Personalization.Common version="3.0.0"
  • EPiServer.ServiceLocation.StructureMap version="2.0.1"
  • EPiServer.Tracking.Commerce version="3.1.2"
  • EPiServer.Tracking.Core version="1.8.0"

Any ideas what should be setup in order to have it working properly?

Dec 30, 2019 10:33

Hi Dariusz,

This issue does not related to Commerce but after a fast investigation, I found that it's because of there is no "Modules" of  InitializationEngine.

I do not testing in code yet but you can refer this code segment and check it:

    public void Setup()
        var moduleList = new List<IInitializableModule>();
        var dummyInitializableHttpModule = new TestInitializableHttpModule();
        _engine = new InitializationEngine((IEnumerable<IInitializableModule>)null, HostType.TestFramework)
            Modules = moduleList

    public class TestInitializableHttpModule : IInitializableHttpModule
        public void InitializeHttpEvents(System.Web.HttpApplication application)
        { }

        public void Initialize(InitializationEngine context)
        { }

        public void Uninitialize(InitializationEngine context)
        { }
Edited, Jan 20, 2020 3:35
* 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.