Could not load file or assembly 'Autofac.Configuration...

Dec 7, 2010 at 4:05 PM

I created a new module via "codegen module Evento /IncludeInSolution:true"

After that I was unable to go to the website due to this error: 

Server Error in '/' Application.

Could not load file or assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified.

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.FileNotFoundException: Could not load file or assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 26:             RegisterRoutes(RouteTable.Routes);
Line 27: 
Line 28:             _host = OrchardStarter.CreateHost(MvcSingletons);
Line 29:             _host.Initialize();
Line 30:         }


Source File: C:\Users\tiagoand\Documents\My Web Sites\orchard2\Global.asax.cs    Line: 28

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Stack Trace:

[FileNotFoundException: Could not load file or assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified.]
   Orchard.Environment.OrchardStarter.CreateHostContainer(Action`1 registrations) +0
   Orchard.Environment.OrchardStarter.CreateHost(Action`1 registrations) +8
   Orchard.Web.MvcApplication.Application_Start() in C:\Users\tiagoand\Documents\My Web Sites\orchard2\Global.asax.cs:28

[HttpException (0x80004005): Could not load file or assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9028953
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +131
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253

[HttpException (0x80004005): Could not load file or assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8950644
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

<!-- [FileNotFoundException]: Could not load file or assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified. at Orchard.Environment.OrchardStarter.CreateHostContainer(Action`1 registrations) at Orchard.Environment.OrchardStarter.CreateHost(Action`1 registrations) at Orchard.Web.MvcApplication.Application_Start() in C:\Users\tiagoand\Documents\My Web Sites\orchard2\Global.asax.cs:line 28 [HttpException]: Could not load file or assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified. at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) [HttpException]: Could not load file or assembly 'Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The system cannot find the file specified. at System.Web.HttpRuntime.FirstRequestInit(HttpContext context) at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) -->
Dec 7, 2010 at 4:35 PM

I realized I was playing with the normal orchard distribution without the full source code ...