2

When I create a new MVC 5 project in a new solution in VS2013 Professional, the context menu of the Controller folder does not have the option to add a controller. Also in the context menu of the View folder, the option to add a view is missing.

I’ve created the MVC 5 project in the following way:

  • Select “New Project” in the Start Page
  • Select “ASP.NET Web Application” in the “New Project” window
  • Select “MVC” in the “New ASP.NET Project” window

In other words exactly like explained in http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started but the Add Controller and Add View options are not shown afterwards.

What I’ve already done:

  • Uninstall and reinstall “VS2013 with update 3” completely (including all components that remain installed after uninstalling VS2013)
  • Added {E3E379DF-F4C6-4180-9B81-6769533ABE47} as 'the first GUID' in the project .vbproj as suggested in some topics about this problem (e.g visual studio 2013 'add controller' missing) but VS2013 undo the change when I open the project again in VS2013.

I looked already to several topics about this problem but could not found a solution for my case. Please help me.

Community
  • 1
  • 1
  • Long shot, but try installing the `ASP.NET and Web Tools 2013` from here : http://www.asp.net/downloads There might be something in the Web Tools which fixes this issue for you. If not, then we've learnt new :) – Jason Evans Oct 01 '14 at 14:57
  • @JasonEvans: Thanks for your fast respons. I've installed the "ASP.NET and Web Tools 2013" but the result is the same :-( – Dirk Verheijke Oct 01 '14 at 15:18
  • Ah OK. This is very weird indeed :( Sorry I couldn't be of more help. – Jason Evans Oct 01 '14 at 15:21
  • Some simular not solved topics: - http://stackoverflow.com/questions/25908990/asp-mvc-5-project-new-scaffolded-item-is-missing-from-the-context-menu?rq=1 - http://stackoverflow.com/questions/21501218/mvc-context-menus-missing?rq=1 I assume this is a bug in VS2013. – Dirk Verheijke Oct 02 '14 at 07:17

2 Answers2

2

Recently I also faced the same issue and I am assuming that it has to do something with Visual Studio 2015 CTP6.

  • Uninstalling and Re installing AspNetWebFrameworksTools_VS12_ENU.msi did the trick for me.

You will find this file in "DVD Drive:\packages\WPT" folder.

I hope this helps others and save their time.

Syeda Zunaira
  • 5,191
  • 3
  • 38
  • 70
Vijay Bhatter
  • 53
  • 1
  • 8
1

For those who are still struggling with this problem, the problem is solved by “accident” in my environment.

Because of a company rule, we had to add our computers to a domain and got a domain account we use to login in the domain. After using that account for a while, I thought: Is this “missing Add Controller option” problem still there? Miraculously the problem is gone as long as a use the domain account!

To locate the origin of the problem, I did some tests with existing and new solutions and came to following conclusions:

  1. When I login with the original local account and open one of the solutions that are made when logged in with the local account, then the “Add Controller option” is still missing.
  2. When I login with the domain account and open one of the solutions that are made when logged in with the local account, then the “Add Controller option” is there.
  3. When I login with the domain account and create a new solution, then the “Add Controller option” is there.
  4. When I login with the original local account and open the new solution that is made when logged in with the domain account, then the “Add Controller option” is there.

FYI: The same applies for the “Add View option”.

In other words, for those who are desperate try to create a new (local ?) user account. Maybe it solves the problem also in your case.

Good luck!

Dirk.