3

When I try to create an ASP.NET 5 project in Visual Studio 2015 Community Edition I don't see the MVC templates: enter image description here

I've tried the solutions from "Missing MVC template in Visual Studio 2015" but no joy.

Does Visual Studio 2015 Community Edition have MVC templates?

4

2 回答 2

9

当我继续前进时,答案非常简单。ASP.NET 5 下没有 MVC 模板选项,因为选择 Web 应用程序会为您提供 MVC 模板。

于 2015-12-14T18:52:09.933 回答
4

如果您在 4.5.2 部分选择 MVC 模板,则 Asp.net 4.5.2 使用 MVC 5。创建项目后,您可以通过查看 web.config 来检查这一点,并且 MVC 的版本号将在那里。

  <dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
  </dependentAssembly>

如果您选择 ASP.NET 5,您将获得 MVC 6,这是一种非常不同的动物。

于 2015-12-11T20:16:24.520 回答