Using new <%: %> syntax/Razor with Mono & ASP.NET MVC`
Mono 2.8 claims to have C# 4.0/ASP.NET MVC 2 support.
However the new <%: %>
syntax doesn't work.
Neither does Razor.
Is there开发者_如何学Go a way to make them work or should I just wait for Mono 3?
The Mono 2.8 release notes seems to indicate ASP.NET 4.0 is now supported. It also points out that the <%: %>
syntax works (listed as Html Encoded Code Expressions
).
However, as pointed out by Mystere Man, Razor is MVC3. MVC3 has not yet been released, so it's not prudent to expect this in Mono for some time.
A quick search of the Mono forums suggests that MVC3 doesn't yet play with Mono 2.8.
bin deployment of MVC3 is working using mono master see post by mono devs about mvc3 but there are still many exception as only System.Web.Mvc is open source other component sourceless
Out of box support isn't there yet due to Razor itself not being part of the open source MVC assembly, but I have Razor working on Mono 2.8.1 by setting up precompilation and a custom view engine / base class that does not call BuildManager.
http://tqcblog.com/2011/01/23/precompiled-razor-for-shared-views-and-mono/
精彩评论