如何在Visual Studio 2017中创建MVC项目?

mah*_*uli 4 asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 visual-studio-2017

我已经安装了Visual Studio 2015,最近安装了Visual Studio2017。安装了.NETCore 2+ SDK。但是,当我要创建新项目时,我无法创建MVC项目。请指导我。

Mat*_*ijs 6

首先:确保已安装Web开发工作负载。

遵循的步骤

  1. 搜索并启动Visual Studio安装程序
  2. 点击修改
  3. 选择ASP.NET和Web开发 选择ASP.NET和Web开发工作负载
  4. 确保在ASP.NET和Web开发下的右侧选中选项.NET Framework 4 – 4.6开发工具
  5. 单击修改以安装工作负载

重新启动VS2017后,选择ASP.NET Core Web Application:

选择ASP.NET Core Web应用程序

希望这可以解决您的问题:-)

  • @mahdisdezfouli现在,选择Web应用程序,然后单击确定。在此模板中,我们找不到ASP.NET MVC模板,因为MVC 6或ASP.NET Core是默认的MVC(模型-视图-控制器)结构。https://social.technet.microsoft.com/wiki/contents/articles/37549.asp-net-mvc-6-in-visual-studio-2017-basics.aspx (4认同)