简体   繁体   中英

What is the difference between ASP.NET MVC 5, ASP.NET Core MVC 5?

I know that .NET Core 3.1 is followed by .NET 5 (this is by itself .net core).

I also know that .NET 4.8 is the last windows only (non .net core) framework.

So I think that ASP.NET MVC 5, ASP.NET Core MVC 5 are both the same. Is that correct?

https://en.wikipedia.org/wiki/ASP.NET_MVC

ASP.NET MVC 1.0 was released on 13 March 2009, not part of the .NET Framework, running on top of ASP.NET, which was then part of .NET Framework 3.5.

MVC's version did not correspond to .NET Framework/ASP.NET versioning. MVC went through version 2, 3 and 4 and ASP.NET MVC 5 was released on 17 October 2013. Meanwhile the .NET Framework went from 3.5 to 4.7, now 4.8 but will never reach a higher major version.


Then .NET Core started under the working title "vNext". It was .NET Core 1, then 2, then 3. .NET Core includes ASP.NET Core, which included ASP.NET Core MVC. This versioned along with its framework.

Now to prevent confusion, they didn't want to name the fourth version of .NET Core as 4, because that'd conflict (not on a filesystem level, but in the heads of developers) with .NET Framework 4. So they unified .NET Framework and .NET Core, and called it .NET 5.


.NET 5 includes ASP.NET Core 5, which includes ASP.NET Core MVC 5, which is not the same as ASP.NET MVC 5.

The old .NET Framework (currently 4.8) and ASP.NET MVC 5.2.7 are considered finished. Maybe they'll receive security patches, but you shouldn't do new development in it, and skip tutorials that mention it.

  • There are several difference between ASP.NET Core 5 and ASP.NET MVC 5 in the solution structure. The ASP.NET Core is a composable framework for implementing web and cloud based applications.
  • ASP .NET MVC 5 helps to choose the MVC or Web API and we can able to choose both while creating a web application. But in Core we can able to choose single-aligned web stack for MVC nad Web API.
  • The file structure are varies between them. the ASP.NET MVC 5 concicts of web.config, Global.asax files. But the Core does not contain these files instead it contains appsettings.json.
  • And the ASP .NET Core does not need IIS for hosting since it is to be cross-platform and it is self hosted.
  • In ASP.NET Core applications, dependency injection is inbuilt and no set up is needed for DI. But in ASP.NET MVC we want to use saparate DI container and then build up the project to use DI.

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