Mono MVC5 - Views don't work

The problem is in Web.config that is inside /Views folder. system.web.webPages.razor host parameter must match exactly with MVC version.

For example if you have MVC 5.2.2.0 then it should look like <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />.


The MVC version of your project must match the version of MvcWebRazorHostFactory, it must be the same. I had to change the version to 5.2.3.0 (in the Views/Web.config file).

<system.web.webPages.razor>
    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0

If you don't know which version of MVC you are using in your project, then go to Project -> Edit references -> then on the right side, under "Selected references" scroll down to System.Web.Mvc where should should see which version you are using. This is how i found out in Xamarin Studio Community.