locked
Razor v1 to Razor v2 RRS feed

  • Question

  • User306634152 posted

    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,

    Tuesday, July 9, 2013 8:23 AM

Answers

  • User-821857111 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 9, 2013 3:06 PM