현재 프로젝트는 IOC/DI에 mvc-turbines (및 unit)을 사용하여 ASP.NET MVC 1로 작성되었습니다.ASP.NET MVC 1 : MVCTurbines를 사용하여 VS2010으로 이동 한 후 "매개 변수없는 생성자 없음"오류가 발생했습니다.
2008 년부터 응용 프로그램을 시작하려고하면 문제가 없지만 2010 년부터는 "매개 변수없는 생성자"오류가 계속 발생합니다.
왜? 둘 다 동일한 .Net 프레임 워크를 타겟팅합니다. VS 2010 솔루션은 기본 컨트롤러 팩토리를 계속 사용합니다. 이 디버그 제안?
[MissingMethodException: No parameterless constructor defined for this object.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +80
[InvalidOperationException: An error occurred when trying to create a controller of type 'CommonProject.Web.Shared.Controllers.MyController'. Make sure that the controller has a parameterless public constructor.]
System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +190
System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +68
System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +118
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +46
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57
System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7
System.Web.Mvc.MvcHttpHandler.VerifyAndProcessRequest(IHttpHandler httpHandler, HttpContextBase httpContext) +61
System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContextBase httpContext) +111
System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContext httpContext) +40
System.Web.Routing.UrlRoutingHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +7
CommonProject.Web._Default.Page_Load(Object sender, EventArgs e) in