Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Razor View Page cannot be added as a new Item - Visual Studio 2010

Background: I used to have VS2010 Professional. Upgraded to VS2010 Ultimate. Installed SP1. Installed MVC3, MVC3 Tools Update

I'm currently working on some custom Orchard modules, and for some reason, I don't see Razor as an installed template. But if I fire up a new ASP.NET MVC3 app, I see it. Has anyone ran into this issue. I've tried uninstalling MVC3 and Tools Update. No luck. Is there something obvious I'm missing?

MVC3 app - as you can see MVC3 View Page (Razor) is available... enter image description here

From an Orchard Module: enter image description here

like image 382
Ta01 Avatar asked May 31 '12 19:05

Ta01


2 Answers

Have you tried to install the Razor engine as a NuGet Package for this solution? Open Package Manager Console (View - Other windows) and enter

  Install-Package RazorEngine

Is the System.Web.Mvc.dll included in the references?

like image 197
ckonig Avatar answered Nov 15 '22 12:11

ckonig


For me editing the project file and adding the value {E3E379DF-F4C6-4180-9B81-6769533ABE47} in front of the others guid's for <projecttypeguids> solved the problem.

like image 45
San Avatar answered Nov 15 '22 12:11

San