Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 28, 2012 07:55 AM by imran_ku07
Apr 23, 2012 06:53 PM|LINK
Is it possible to use the Razor v2 View Engine in an MVC3 application? I see there are NuGet packages, but when I install them in my application I still cannot use the new Url Resolution (using href="~/Path/file.css", instead of href="@Url.Content("~/Path/file.css")")
or Automatic Attributes within my views.
Do I need to override something in my web.config? Or am I misunderstanding all of this and it is only available in MVC4? If that is the case, what is the purpose of the Razor NuGet Packages?
Apr 23, 2012 07:18 PM|LINK
Razor 2 is largely what makes MVC 4. It's not available in MVC 3. What packages are you talking about?
Apr 23, 2012 07:25 PM|LINK
Are these two seperate things? Looked at the examples and the syntax looked pretty much the same. Perhaps this one is meant more for populating templates at run time for things like email?
Apr 23, 2012 07:57 PM|LINK
Yep - that's a separate thing. It is intended to allow you to build templates using the Razor syntax, but external to MVC or ASP.NET Web Pages.
Apr 23, 2012 08:06 PM|LINK
That clarifies things. Thank you for your help.
Apr 28, 2012 07:55 AM|LINK
Using Razor V2 in ASP.NET MVC 3