7

This is not a duplicate. See my comments, and also see my additional diag. results

edit Now it is became more weird. Next morning I've opened my VS and this project, and Scaffolding menu items were there. Used them for a few times, then it disappeared. I thought I did something in the project so source control undo all: Not helped. VS close/open: Not helped. Machine restart: Not helped. Creating a brand new ASP MVC 5 project, that project also do not have any MVC like contect menu, neither right clicking on Controllers or Views: Not helped. This is scary. But besides of scary I am practically disabled in my work :-( Do anybody have any idea what's going on? edit

Using VS 2013 update 3 I've created a new ASP MVC 5 project. Right clicking in the Controllers folder in the Solution Explorer, the 'New Scaffolded Item...' is missing from the context menu. Btw the Add Controller is also missing. See attached pic.

Additional diag results:

1) The very same solution transferred to an other machine works as expected. The solution was transferred via source control, so it is the same .csproj file (well .csproj.user can differ)

2) The solution we talking about was created in my machine, which exhibits the issue

3) If I repeat the experiment, creating a new ASP MVC 5 Web app in my machine, the context menu is missing.

Context menu for Controllers folder

What am I missing? Thx in advance

g.pickardou
  • 32,346
  • 36
  • 123
  • 268
  • possible duplicate of [visual studio 2013 'add controller' missing](http://stackoverflow.com/questions/19849812/visual-studio-2013-add-controller-missing) – Claies Sep 18 '14 at 09:36
  • 3
    I think this is not a duplicate, and the answers there will not apply in my case. This is a brand new ASP MVC 5 project created with VS 2013 Update 3... – g.pickardou Sep 18 '14 at 09:41
  • 4
    I'm having the exact same issue. Have yet to find an answer. – Dave Voyles Jan 05 '15 at 18:08
  • Having same problem with Visual Studio 2013 Update 4. – Tom Regan Sep 07 '16 at 20:50

4 Answers4

6

I know it's a rather old pos, but I had the same problem and found a solution which worked in my case, which I wanted to share.

I had to update my NuGet Packages on the project before I had the entry "new Scaffolded item".

You do it like so: Right click on project -> Manage NuGet Packages -> There you update "Microsoft ASP.NET Web Pages" and "Microsoft ASP.NET MVC"

Now I had the entry in the context menu

Regards Christian

Christian
  • 609
  • 8
  • 22
2

All you need is add the following entries to your project.json file

    Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
      "version": "1.0.0-preview2-final",
      "type": "build"
    },
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
      "version": "1.0.0-preview2-final",
      "type": "build"
    }
  }
Unamata Sanatarai
  • 6,475
  • 3
  • 29
  • 51
  • Added the section in project.json file like above, and it installed the related packages in Visual Studio. After that, the Add -> New Scaffolded Item... appeared !! – user645896 Feb 07 '17 at 16:22
0

Make sure you've installed Microsoft ASP.NET 5 RC1.

You can get it here: https://go.microsoft.com/fwlink/?LinkId=627627

Lars
  • 9,976
  • 4
  • 34
  • 40
0

Use .Net Framework 4.5 in the application. In same IDE I was not able to see the "new Scaffolded item" context menu in the project which was created on .NET Framework 4 but in the application created in .NET Framework 4.5 I can see it.

Shuvankar Sarkar
  • 409
  • 4
  • 11