Using VS2012 I've created a blank ASP.NET website. When I create a new cshtml page it uses Razor v1. How can I change the project so that it uses Razor v2. I've tried installing Razor v2 using NuGet but it doesn't work.
I could create a new Razor v2 website project but that comes with a load of junk pages and I wanted to start clean.
There is no "Empty Site" template in VS, which is why I usually create the site in WebMatrix using its Empty Site template and then open in it VS. Or you can simply delete all the cruft that comes with the VS template once you have created your site.
Member
2 Points
6 Posts
Razor v1 to Razor v2
Jul 09, 2013 08:23 AM|mpeck26|LINK
Hi,
Using VS2012 I've created a blank ASP.NET website. When I create a new cshtml page it uses Razor v1. How can I change the project so that it uses Razor v2. I've tried installing Razor v2 using NuGet but it doesn't work.
I could create a new Razor v2 website project but that comes with a load of junk pages and I wanted to start clean.
Thanks,
RAZOR
All-Star
194030 Points
28034 Posts
Moderator
Re: Razor v1 to Razor v2
Jul 09, 2013 03:06 PM|Mikesdotnetting|LINK
There is no "Empty Site" template in VS, which is why I usually create the site in WebMatrix using its Empty Site template and then open in it VS. Or you can simply delete all the cruft that comes with the VS template once you have created your site.
RAZOR