installing the razor view engine for Visual Studio

蓝咒 提交于 2019-12-05 21:11:57

问题


I just downloaded and installed Web Matrix beta.
I am really liking the razor view engine.
Not so much the Web Matrix IDE.

Is there any way to install razor view engine for use in the Visual Studio without installing WebMatrix?


回答1:


Yes, as part of the ASP.NET MVC 3 Preview 1 released yesterday

http://go.microsoft.com/fwlink/?LinkID=157073




回答2:


What's currently offered in WebMatrix isn't really a ViewEngine in the current MVC sense, it's a parser/templating engine, more like T4 templates, in fact.

That said, Razor most certainly will be incorporated as a ViewEngine option in MVC3, and should be included in the next Preview release of MVC. (see ScottGu's post: http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx)

So, in short, you'll be able to use Razor as your ViewEngine in MVC very soon.

EDIT: Also, check out another answer of mine for some steps on creating a full Razor ViewEngine in VS 2010 now. A few manual steps, but you get get going in minutes.




回答3:


Actually it can be done as its assemblies are part of WebMatrix CTP. It lacks MVC integration but some code handcrafting gives visible results. Please look at http://stefan.rusek.org/Posts/Using-Razor-with-ASP-NET-MVC-in-Four-Easy-Steps/26/




回答4:


http://channel9.msdn.com/posts/Glucose/Hanselminutes-on-9-Razor-IIS-Express-SQL-4-Compact-Edition-and-VS2010-Tooling-with-Damien-Edwards/

From what I could gather from this Channel 9 post, not right now but maybe in the final version if enough people complain about it.



来源:https://stackoverflow.com/questions/3251396/installing-the-razor-view-engine-for-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!