I've installed the freshly released Mono 3 and MonoDevelop on my Mac, and I was keen to get a simple MVC web application working with razor view pages.
When I File-New-Solution up a MVC 3 Web Application (razor), the thing doesn't compile, giving the error:
The type or namespace GlobalFilterCollection could not be found
It's because 2 references are not working - System.Web.Helpers and System.Web.WebPages. When I look at these in the references list in MonoDevelop, they are red with "Assembly not available" - looking at the references in more detail it seems I'm referencing system.web.mvc 2.0.0.0, whereas everything else is 4.0.0.0. Can anyone advise?
I eventually got mine to run by referencing the System.Web.Mvc.dll found in /Library/Frameworks/Mono.framework/Libraries/mono/4.5/
I also had to bring over System.Web.Helpers.dll from a Windows box and update the Web.Config using one generated by Visual Studio.
There's probably a better way to do this (please be a better way), but figured I'd pass on what I found.
Add packeges "Microsoft ASP.NET MVC" and "Microsoft ASP.NET Web Pages" from NuGet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With