title: Is it possible to use Razor 2.0 view engine under mono?
body: <p>I was insterested in Razor 2.0's <a href="http://www.asp.net/web-pages/overview/what%27s-new/top-features-in-web-pages-2#Changes_for_the_Beta_Version">condition attributes</a> feature, so I tried to port Razor 2.0 to my MVC3 apps. I followed <a href="http://dotnet.dzone.com/articles/using-razor-v2-aspnet-mvc-3">this link</a> and successfully run my simple app (with one <code>HomeController</code>, one <code>Index</code> action and one <strong>*~/Views/Home/Index.cshtml</strong> view) on <strong>Windows with ASP.NET</strong>.</p>
  
  <p>But when I deployed my app on mono runtime on Ubuntu, it fails to run and continues to report an error of <strong>Cannot find view</strong>:</p>
  
  <blockquote>
    <p>Server Error in '/' Application
    The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/Home/Index.aspx ~/Views/Home/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx ~/Views/Home/Index.cshtml ~/Views/Home/Index.vbhtml ~/Views/Shared/Index.cshtml ~/Views/Shared/Index.vbhtml</p>
  </blockquote>
  
  <p>I googled for this error, most of the articles says it is a problem of view compiling, so I thought it is caused by mono cannot properly use the new Razor engine's compiler to compile <strong>Index.cshtml</strong>.</p>
  
  <p>I then switched my app back to Razor 1.0 and everythings works fine under mono, so is it really a problem that mono cannot run Razor 2.0? or is there any quick solution to this problem?</p>
  
  <p>Thanks</p>