Is it possible to get an ASP.NET MVC 3 project working under Mono 2.10?

kim3er picture kim3er · Feb 16, 2011 · Viewed 11.1k times · Source

Mono 2.10's release notes suggest support for ASP.NET MVC 3.0 and Razor using XSP.

Upon opening a newly created ASP.NET MVC 3.0 default project (created with Visual Studio 2010) in MonoDevelop 2.4.2 (Mac OS X), the following DLLs are missing:

System.Web.Entity
System.Web.Helpers
System.Web.Mvc
System.Web.WebPages

All of which I replace with DLLs obtained from my Windows installation. The project builds, but I receive the following error message when trying to debug the project:

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.

Prior to making these replacements, the application runs but obviously with missing reference errors. Which would suggest that something in the new DLLs is screwing up the XSP server.

What am I doing wrong? Am I being too simplistic? I'm new to Mono and MonoDevelop, but I am successfully able to create, build and debug MVC 2.0 projects with my current installation of MonoDevelop.

Answer

kim3er picture kim3er · Mar 9, 2011

I'm elated. The new version of Mono, 2.10.1, fixed the issues with ASP.NET MVC 3.0. It is running without a hitch.