简体   繁体   中英

Does Visual Studio 2019 community edition support MVC 5 projects?

I wanted to start an MVC 5 project to follow a course, so I went to the Tools > Get Tools and Features. I can only see MVC 4 in the Individual components tab.

Does it mean I need to install different version of Visual Studio?

It will come in as a nuget package ( System.Web.Mvc ) and not the Tools and Features installer of VS.

You'll require at least version 4.52 of .NET Framework (and I think) it would default to MVC 5.x by default (I could be wrong) but you can upgrade the nuget package manager and update it manually.

You don't have to install any nuget package for that. Just create a new project in vs 2019 community and on project template selection page, select "ASP.NET Web Application (.Net Framework)". It will default to MVC5 project.

Project Template Selection window

You can check the mvc version later in web.config file.

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

here you can see assembly name and its version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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