上下文菜单中缺少 ASP MVC 5 项目“New Scaffolded Item..." [英] ASP MVC 5 project 'New Scaffolded Item...' is missing from the context menu

查看:17
本文介绍了上下文菜单中缺少 ASP MVC 5 项目“New Scaffolded Item..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是重复的.查看我的评论,并查看我的附加诊断.结果

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

编辑现在变得更奇怪了.第二天早上,我打开了我的 VS 和这个项目,脚手架菜单项就在那里.用了几次,然后就消失了.我以为我在项目中做了一些事情,所以源代码控制撤消了所有:没有帮助.VS 关闭/打开:没有帮助.机器重启:没有帮助.创建一个全新的 ASP MVC 5 项目,该项目也没有任何类似 MVC 的内容菜单,也没有右键单击控制器或视图:没有帮助.这很可怕.但除了可怕之外,我的工作实际上是残疾人:-(有人知道发生了什么吗?编辑

使用 VS 2013 更新 3 我创建了一个新的 ASP MVC 5 项目.右键单击解决方案资源管理器中的 Controllers 文件夹,上下文菜单中缺少新建脚手架项...".顺便说一句,添加控制器也不见了.见附图.

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.

其他诊断结果:

1) 转移到另一台机器的完全相同的解决方案按预期工作.该解决方案是通过源代码管理传输的,因此它是相同的 .csproj 文件(好吧 .csproj.user 可以不同)

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) 我们所说的解决方案是在我的机器上创建的,这显示了问题

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

3) 如果我重复这个实验,在我的机器上创建一个新的 ASP MVC 5 Web 应用程序,上下文菜单就会丢失.

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

我错过了什么?提前谢谢

What am I missing? Thx in advance

推荐答案

我知道这是一个相当老的 pos,但我遇到了同样的问题,并找到了一个适用于我的案例的解决方案,我想分享一下.

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.

我必须在项目中更新我的 NuGet 包,然后才能获得新的脚手架项"条目.

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

您可以这样做:右键单击项目 -> 管理 NuGet 包 -> 在那里更新Microsoft ASP.NET Web Pages"和Microsoft ASP.NET MVC"

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

问候克里斯蒂安

这篇关于上下文菜单中缺少 ASP MVC 5 项目“New Scaffolded Item..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆