2

I already searched my ItemTemplates in Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC\1033

It doesn't contain an AddController itemtemplate as in Asp.Net MVC 4.

I had a choice in other projects between adding WebApi Controller and WebController, somehow it dissapeared.

My menu in Tools - Customize seems to be okay...

I also repaired Visual Studio

Could there be anything else that's wrong?enter image description here

5
  • Try to unload and reload the project. Can you post the <ProjectTypeGuids> value (from the .csproj) Commented Jan 8, 2015 at 23:30
  • <ProjectGuid>{10998B1B-70BD-467E-9C84-B96FD48D1736}</ProjectGuid> <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> Already setup a different MVC project, but had the same problem... So i don't think the problem is there Commented Jan 8, 2015 at 23:44
  • Isn't that menu context sensitive? If you select "New item" and then a new controller it should appear in that menu again if I'm not mistaken. Commented Jan 9, 2015 at 8:06
  • Add new Item should have controller template... Commented Jan 9, 2015 at 8:10
  • I haven't changed any names, so i don't think any lowercases or so are changed. Where is the ControllerTemplate of MVC 5 created then? (I have found the one for MVC 4) Commented Jan 9, 2015 at 10:06

2 Answers 2

2

No, usually MVC5 has this entry in the context menu, if you right click this folder. Try: Right-Click "Controllers" folder > Add > New Scaffolded Item... > "Click here to go online and find more scaffolding extensions" and install "Microsoft Visual Studio ASP.NET MVC5 Scafolding".

If you do not have the "New Scaffolded Item" entry, just click "New Item", the link to the online library of extensions can also be found there.

Let me know if this works.

Sign up to request clarification or add additional context in comments.

1 Comment

Adding 'Controllers' folder to an empty project enables 'MVC Controller' option. Right click on that folder.
2

The project with Framwork 4.6.1 can find controller by: Right-Click "Controllers" folder > Add.

enter image description here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.