Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add controller option is missing in Visual Studio 2015

I am using Visual studio 2015 and after opening an existing project, I am not able to see the add controller option while right clicking on the Controller Folder. Please help.

like image 501
Sagnik Mukherjee Avatar asked Oct 02 '15 06:10

Sagnik Mukherjee


2 Answers

I had the same problem on my ASP.NET project in VS2015. I solved by installing Microsoft.VisualStudio.Web.CodeGeneration.Tools. It doesn't appear in NuGet Manager so you have to install with Package Manager Console: Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Tools -Version 1.0.0-preview2-final -Pre

Hope it helps

like image 181
Marc Avatar answered Oct 05 '22 00:10

Marc


  • Open VS2015=>TOOLS=>Customize
  • Select Commands
  • Select Context menu
  • Select Project and Solution Context Menus|Folder|Add
  • Check that 'Controller' appears.
  • IMPORTANT - Move up Controller item to the top.
like image 29
Chris Halcrow Avatar answered Oct 05 '22 00:10

Chris Halcrow