將解決方案從MVC 1.0.0.0 Visual Studio 2008遷移到MVC 2.0.0.0 Visual Studio 2010後,以下錯誤:將解決方案從MVC 1.0.0.0 Visual Studio 2008遷移到MVC 2.0.0.0後出現錯誤Visual Studio 2010(IControllerFactory)
The controller factory type 'MyLib.MyControllerFactory' must implement the IControllerFactory interface.
Parameter name: controllerFactoryType 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.ArgumentException: The controller factory type 'MyLib.MyControllerFactory' must implement the IControllerFactory interface. Parameter name: controllerFactoryType
Source Error: Line 35: protected void Application_Start() Line 36: { ... container initialization ... Line 38: ControllerBuilder.Current.SetControllerFactory(typeof(MyControllerFactory));
MyLib中是MVC實現的外部共享庫1.0.0.0
嗨,謝謝你的幫助。我找到了一種方法使其工作,但不能發佈答案(網站限制8小時)。它需要在global.asax和運行時配置設置中將MVC 1.0.0.0映射到MVC 2.0.0.0。我明天會發布。 –
圖書館的重新編譯也不是一個好的選擇,因爲它在其他團隊擁有的多個項目中共享。 –