ASP MVC 5 project "A new element of the forest ..." is not in the context menu

This is not a duplicate. See my comments, as well as see My Additional Diag. results

edit Now it has become weirder. The next morning I opened my VS and this project, and the menu items for the forests were there. Used them several times, then he disappeared. I thought that I did something in the project, so the initial control cancels everything: it did not help. VS close / open: did not help. Restarting the machine: did not help. Creating a new ASP MVC 5 project, this project also does not have any MVC contect menu, right-click on the controllers, or Views: did not help. This is scary. But, besides the terrible, I am almost disconnected in my work :-( Does anyone know what is going on? Change

Using the VS 2013 update 3 I created a new ASP MVC 5 project. Right-clicking in the Controllers folder in Solution Explorer does not display the "New Forest Element ..." context menu. Btw Add Controller is also missing. See the attached figure.

Additional diag results:

1) The same solution passed to another machine works as expected. The solution was passed through source control, so this is the same .csproj file (well .csproj.user may vary)

2) The solution we are talking about was created on my machine, which indicates a problem

3) If I repeat the experiment by creating a new ASP MVC 5 web application on my computer, the context menu is missing.

Context menu for Controllers folder

What am I missing? thanks in advance

+6
source share
5 answers

I know this is a pretty old position, but I had the same problem, and I found a solution that worked in my case, and I wanted to share it.

I had to update my NuGet packages in the project before I got the entry β€œNew Lining Element”.

You do it like this: Right-click on the project -> NuGet Package Management -> There you will update "Microsoft ASP.NET Web Pages" and "Microsoft ASP.NET MVC"

Now I had an entry in the context menu

Christian Relations

+3
source

All you need to do 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" } } 
+2
source

Make sure you have installed Microsoft ASP.NET 5 RC1.

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

0
source

A section was added in the project.json file as described above, and it installed related packages in Visual Studio. After that, the element Add β†’ New Scaffolded Item appeared.

0
source

Use .Net Framework 4.5 in the application. In the same IDE, I could not see the β€œnew forest item” context menu in a project that was created on the .NET Framework 4, but in the application created on the .NET Framework 4.5, I see this.

0
source

Source: https://habr.com/ru/post/975478/