简体   繁体   English

为 VS2015 中缺失的 Mvc 应用程序添加区域选项

[英]Add Area Option for Mvc application missing in VS2015

I have an vs 2015, i am working on mvc application but when i tried to add area i cann't see add area option any where in those option, but i could able to add those in 2012 version.我有一个 vs 2015,我正在开发 mvc 应用程序,但是当我尝试添加区域时,我在这些选项中的任何位置都看不到添加区域选项,但我可以在 2012 版本中添加这些选项。 And also in case of adding controller to the project i can't add normal MVc controller to my project it's giving only option for adding Web api controller and and its types, how should i make this work ?而且,如果将控制器添加到项目中,我无法将普通 MVc 控制器添加到我的项目中,它仅提供添加 Web api 控制器及其类型的选项,我应该如何使其工作? sholud i install some scaffolder templates or what ?我应该安装一些脚手架模板还是什么? can i get the solution for this issue ??我能得到这个问题的解决方案吗?? , thanks in advance. ,提前致谢。

For VS 2019对于VS 2019

  1. Press right click on ur project按右键单击您的项目

2. Add 2. 添加

3. New Scaffolded Item... 3. 新的脚手架项目...

4. MVC 5 Area 4. MVC 5 区

Yes, I found the problem that it's my project issue.是的,我发现问题是我的项目问题。 adn becuase it was a mvc4 project and i am trying to run in vs 2015, it couldn't able to recongnize as right version.因为它是一个 mvc4 项目,我试图在 vs 2015 中运行,它无法识别为正确的版本。

and Updating my project mvc version solved the problem并更新我的项目 mvc 版本解决了这个问题

Ref 1. https://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806参考 1. https://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806

Ref 2. http://www.codingdefined.com/2015/04/how-to-fix-systemmethodaccessexception.html参考 2. http://www.codingdefined.com/2015/04/how-to-fix-systemmethodaccessexception.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM