Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting a ASP.NET MVC3 project in MonoDevelop? Steps to do so?

I'm using MonoDevelop on the Mac with the latest Mono version installed.

What steps do I need to take to start using MVC3 in a project with RAZOR syntax (.cshtml files)?

I've read http://www.mono-project.com/Release_Notes_Mono_2.10#ASP.NET_MVC3_Support but it doesn't spell it out. How do I create my first .cshtml file? How do I tell my application to point to Index.cshtml, and not the default Index.aspx file when creating an MVC (2) project in MonoDevelop?


Update

I started a new MVC2 project in Mono. I started a new MVC3 project in VS 2010. I copied all the required DLLs over from the MVC3 to the MVC2 project in Mono. Now I build and get a "The compiler has appeared to crash" in Mono.

Error when building

I thought there was MVC3 support? http://mono-project.com/Release_Notes_Mono_2.10#ASP.NET_MVC3_Support What am I doing wrong here?

like image 230
program247365 Avatar asked Oct 17 '11 20:10

program247365


3 Answers

I'm not sure how deep you're diving into Mono or what enviroment you're using, but here are three pretty useful blog articles about using MVC and Mono:

The second link has a downloadable MVC application that has already been setup to run with a version of Mono and uses MySql with the membership provider scheme scripted into it.

I hope these links help you, and good luck with your project.

like image 73
Chris Avatar answered Oct 14 '22 16:10

Chris


If you are getting the "Compiler has appeared to crash" when trying to cut over to MVC3, you should set your project to .NET 4. You can do this by right clicking on the project->Options->Build->General and selecting Mono / .NET 4.

like image 4
Gator Avatar answered Oct 14 '22 17:10

Gator


This gentleman seems to have had some success in getting MVC3 running in monodevelop on a mac.

like image 3
Fuel Avatar answered Oct 14 '22 18:10

Fuel