Asp.net-Mvc-3
是否可以讓 ASP.NET MVC 3 項目在 Mono 2.10 下執行?
Mono 2.10 的發行說明建議使用XSP支持 ASP.NET MVC 3.0 和Razor。
在 MonoDevelop 2.4.2 (Mac OS X) 中打開新創建的 ASP.NET MVC 3.0 預設項目(使用 Visual Studio 2010 創建)時,缺少以下 DLL:
System.Web.Entity System.Web.Helpers System.Web.Mvc System.Web.WebPages我將所有這些替換為從我的 Windows 安裝中獲得的 DLL。項目建構,但在嘗試調試項目時收到以下錯誤消息:
Adding applications '/:.'... Registering application: Host: any Port: any Virtual path: / Physical path: /.../Mvc3Test/ Handling exception type TargetInvocationException Message is Exception has been thrown by the target of an invocation. IsTerminating is set to True System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.在進行這些替換之前,應用程序執行但顯然缺少參考錯誤。這表明新 DLL 中的某些東西正在搞砸 XSP 伺服器。
我究竟做錯了什麼?我是不是太簡單了?我是 Mono 和MonoDevelop的新手,但我能夠使用目前安裝的 MonoDevelop 成功創建、建構和調試 MVC 2.0 項目。
我很高興。Mono 的新版本 2.10.1 修復了 ASP.NET MVC 3.0 的問題。它執行順利。