Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Add Area" is not appearing in visual studio 2010 ultimate

I want learn, how to create a custom module in orchard cms (ASP.net mvc3). For that i am studying from this url http://docs.orchardproject.net/Documentation/Walkthrough-Writing-An-Orchard-Module.There the first step is "Right-click the project node in VS Solution Explorer, and choose "Add > Area..."".But i can't find any "Area" template in my visual studio ultimate 2010.I have searched in google, but i can't find any usefull information.

Please help me!

like image 255
sathishkumar Avatar asked Nov 28 '22 09:11

sathishkumar


2 Answers

I guess Visual Studio is not recognizing this project as an MVC type project. VS looks into the Project File to see what type of project it is then it will offere project specific menu options.

Check Your Project file and see whether there is the required value for MVC in ProjectTypeGuids node

Step 1) : Go to your solution explorer and unload the existing ASP.NET project by right clicking and selecting “Unload Project”

enter image description here

Step 2) Right Click the Project in solution explorer and select “Edit your project file name“

enter image description here

Step 3) Go to the Element called “ProjectTypeGuids” and Add {E53F8FEA-EAE0-44A6-8774-FFD645390401}; infront of the existing content.

Save the file and Reload the Project and now you will have the MVC specific Items.

enter image description here

Here is a sample where i have demonstrated step by step how to edit the project file to include the MVC options in an ASP.NET website when you do the conversion.

like image 195
Shyju Avatar answered Dec 09 '22 13:12

Shyju


For VS 2019

  1. Press right click on your project

  2. Add

  3. New Scaffolded Item...

  4. MVC 5 Area

like image 39
smrsgv Avatar answered Dec 09 '22 15:12

smrsgv