title: MVC5 Autofac: The view found at was not created
body: <p>I created very simple MVC 5.0 application that I push to GitHub repository: <a href="https://github.com/marxin/mvc-sample" rel="nofollow">https://github.com/marxin/mvc-sample</a>. My motivation is to execute app on Linux with mono 3.2.3.</p>
  
  <p>I would like to add Autofac NuGet package (more precisely 3.3.0), that works fine for me. Problem is that if I add Autofac.Mvc5 integration package, Razor stops working with following error:</p>
  
  <pre><code>System.InvalidOperationException
  The view found at '~/Views/Home/Index.cshtml' was not created.
  
  Description: HTTP 500.Error processing request.
  
  Details: Non-web exception. Exception origin (name of application or object): System.Web.Mvc.
  Exception stack trace:
  at System.Web.Mvc.BuildManagerCompiledView.Render (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) [0x00000] in &lt;filename unknown&gt;:0 at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) [0x00000] in &lt;filename unknown&gt;:0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in &lt;filename unknown&gt;:0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (IList`1 filters, Int32 filterIndex, System.Web.Mvc.ResultExecutingContext preContext, System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in &lt;filename unknown&gt;:0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive (IList`1 filters, Int32 filterIndex, System.Web.Mvc.ResultExecutingContext preContext, System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in &lt;filename unknown&gt;:0 
  </code></pre>
  
  <p>Diff: <a href="https://github.com/marxin/mvc-sample/commit/ca980adcf1d67e2e74729b27b11c26065dd2567e" rel="nofollow">https://github.com/marxin/mvc-sample/commit/ca980adcf1d67e2e74729b27b11c26065dd2567e</a></p>
  
  <p>Could you please help me what's the necessary minimum that must be registered for Autofac to enable Razor view pages?</p>
  
  <p>If I try aspx template, all works fine.</p>
  
  <p>Thank you, Martin</p>