Context menu to Add Controller/View missing

前端 未结 17 1029
时光说笑
时光说笑 2020-11-28 06:04

I have integrated ASP.NET MVC 4 into existing asp.net web site. Both works fine but I don\'t see any menu/shortcuts to create controller/view within visual studio IDE. Are

相关标签:
17条回答
  • 2020-11-28 06:20

    Do nothing just update your MVC project. Fire this command in your Nuget Package Manager console.

    Update-Package Microsoft.AspNet.Mvc

    0 讨论(0)
  • 2020-11-28 06:22

    For older version

    {F85E285D-A4E0-4152-9332-AB1D724D3325}
    
    0 讨论(0)
  • 2020-11-28 06:22

    This problem can also occur when you have just checked out a fresh copy of your solution from your code repository and the NuGet packages, including Microsoft.AspNet.Mvc, have not yet been downloaded. Rebuilding the solution fixes the problem.

    0 讨论(0)
  • 2020-11-28 06:23

    Answer 2 was correct just wrong guid

    {E53F8FEA-EAE0-44A6-8774-FFD645390401}

    is what you need for MVC in VS2010

    0 讨论(0)
  • 2020-11-28 06:25

    I had the same problem when opened MVC project as Web Site. I reopened solution thru Open -> Project and this functionality worked as I expected.

    0 讨论(0)
  • 2020-11-28 06:27

    For me it was missing from where I expected it to exist (at the top of the menu which shows when you right click on a view folder and click on 'Add'), but then I found it at a sub context menu under 'New From Template'! I have re-sharper installed, I guess it happened because of it (Also Visual Studio 2012):

    enter image description here

    0 讨论(0)
提交回复
热议问题