I upgraded my project to Razor viewer, but VS2010 still automatically creates WebForms

I upgraded to MVC3 and Razor, everything works fine. However, in my return View(model); The view is red, and VS2010 will help me suggest creating a view. When I do this, it generates an aspx / WebForms view. There are no other aspx files in the project, and if I run the project, the Razor viewer works fine. Obviously, somewhere in the VS2010 setup, which is the default, I cannot find it. Any suggestions?

0
source share
2 answers

This is not an explicit answer, but a list of actions that you could try.

  • In the csproj file of your project, make sure that the <ProjectGuidType> parameter is set to <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
  • Try changing ProjectGuid to another Guid ( last post ). You will need to update the sln file or just recreate the solution.
  • Not sure which method you used to upgrade, but see Codeclex MVC 3 Upgrade Tool
+2
source

If you can create a new ASP.NET MVC 3 project and add the Razor view as expected, then the project in which you see this behavior skips a tutorial like the ASP.NET MVC 3 project, which you can find in the new ASP.NET MVC 3 project .csproj. If you cannot do this, try reinstalling the ASP.NET MVC 3 tools update.

+1
source

All Articles