How to enable the "Add Controller" option in the menu?

Asked

Viewed 675 times

0

Recently the option of mine Adicionar controller is off the menu. I’m using Visual Studio 2013, and the project is ASP NET MVC, version 5.1. How to fix this problem?

Ausência do Botão

  • Did it disappear only in this project or in all MVC projects? If you create a new one, to test, you still don’t have the option?

2 answers

1


Create a new MVC 5.1 project. If the option works in this new project, open the new file .csproj in a text editor and look for the tag <ProjectTypeGuids>. It contains the list of Guids of templates associated with the project. One of these Guids is MVC projects.

Compare with the .csproj of your original design and add whatever is missing.

This has happened to me in previous versions of MVC and I fixed it that way.

  • 1

    opa, thanks, whoever has the same problem adds the {E3E379DF-F4C6-4180-9B81-6769533ABE47}; no <Projecttypeguids>, which was missing. <Projecttypeguids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</Projecttypeguids>

0

NO visual studio 2012 this option comes by default as you know. Already tried using the same shortcut of VS12: CTRL+M, CTRL+C ?

  • tried the shortcuts and did not recognize, the option came by default in 2013 too, the problem that she simply disappeared from the menu a few days to ca, and I am not identifying a way to enable her again.

  • Take a look at this answer. It is said there that in the last version the button was added again. Have you seen if the version you have is the last release? http://stackoverflow.com/questions/17623516/in-visual-studio-2013-asp-net-mvc-5-how-do-i-add-a-new-controller

Browser other questions tagged

You are not signed in. Login or sign up in order to post.