我将 ASP.NET MVC 2 RC2 源代码添加到我的解决方案中(使用这些说明:http: //blog.stevensanderson.com/2009/02/03/using-the-aspnet-mvc-source-code-to-debug -your-app/),但现在由于 Autofac 的错误而无法构建。
The type 'System.Web.Mvc.IControllerFactory' is defined in an assembly
that is not referenced. You must add a reference to assembly
'System.Web.Mvc, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.
对 MVC 版本 1 的引用让我特别困惑。甚至在我添加 MVC 源代码之前,我使用的是 MVC 2(来自二进制文件)并且 Autofac 没有抱怨。