I'm lost. What happened to ASP.NET MVC 5?

  • A+
Category:Languages

I've been keeping my head down working on various projects and apparently Microsoft has been busy making some big changes and it's confusing the hell out of me. ASP.NET Core first came onto my radar when I installed Visual Studio 2017 last year and went to create a new project and suddenly had choices of .NET Framework, .NET Standard, and .NET Core. So I looked into them a little and saw that the latter two are, in some way, abbreviated versions of the full framework. I read this post by Scott Hanselman ASP.NET 5 is dead - Introducing ASP.NET Core 1.0 and .NET Core 1.0 I also found this, which steered me away from ASP.NET Core: Choose between ASP.NET and ASP.NET Core. My takeaway was "Core is new, you're fine to keep using the full framework." So I created a new ASP.NET MVC site using .NET Framework 4.6.2 and Microsoft.AspNet.Mvc 5.2.3.

Since creating that project, I found what seemed like some bugs in both MVC and Entity Framework only to find that the only mention of them on the web seems to be in Core and that's the only place they're being considered being fixed.

Now, today, I'm trying to look up the documentation on System.Web.Mvc.Controller and System.Web.Mvc.JsonResult and it's gone except under Core documentation. I did finally dig it up here where it says it's no longer being maintained?

I understood this much about Core and said, "ok, why should I care? I'm going to keep doing what I'm doing and check back on that when it's done." But now it seems that 4.6.2 is not even supported anymore. Can someone explain what's going on? Is my NET 4.6.2/MVC 5.2.3 project now obsolete before I'm even finished writing it? If not, why has the documentation been retired and hidden away? I'm worried some of my dependencies might not even be available for or compatible with Core.

 


Microsoft needs a good slapping for the amount of confusion over the past 2 years over .NET Core / DNX, ASP.NET Core, .NET Standard and the rest.

(and I'm saying that as a former FTE SE in DevDiv...)

  • ASP.NET aka "System.Web" is now dead. WebForms is dead (hurrah!)
  • ASP.NET MVC launched in 2008 was built on-top of ASP.NET, but bypassed all of the WebForms infrastructure.
    • ASP.NET MVC has its own versioning separate from ASP.NET and ASP.NET Web API (and ASP.NET Core). You linked to ASP.NET MVC 5's documentation - this is not the same thing as ASP.NET 5.
  • ASP.NET Web API launched in 2012 is a sibling of ASP.NET MVC, in that it built on-top of ASP.NET too, but had its own class library (System.Web.Http) that didn't share much with ASP.NET MVC (System.Web.Mvc). Attempting to combine an ASP.NET Web API service with an ASP.NET MVC web-application in the same project is an exercise in pain.
  • ASP.NET MVC 5 was launched in 2014 as an update to ASP.NET MVC 4. It is unrelated to ASP.NET 5.
  • ASP.NET MVC 6 was never released. It was rolled-into ASP.NET 5 which then became ASP.NET Core. Its goal was to combine ASP.NET MVC and ASP.NET Web API into a single single platform.
  • ASP.NET Core was launched in 2016 as an improved design of ASP.NET MVC 5 but without the dependencies on System.Web.dll or any (now-legacy) IIS dependencies (e.g. the old request pipeline, IHttpHandler and IHttpModule no longer exist).
    • Note that ASP.NET Core's class library's root namespace is now Microsoft.AspNet and not System.Web. This was a source of confusion for me. This means that upgrading projects from ASP.NET MVC and ASP.NET WebAPI to ASP.NET Core are non-trivial, despite their fundamental architecture of Controllers and Middleware being the same.

Separately from all this we have .NET Core (aka dnx): - .NET Core is a new version of the CLR and BCL which is explicitly portable and runs on Linux and macOS. Its class library is a tad anemic compared to the full-fat .NET Framework which is a Windows-exclusive.

  • "Core" is the new Microsoft "hot name" for the current generation of .NET platforms which work with .NET Core (i.e. they have no Windows dependencies and so are portable). (Just like how Microsoft stuck "Active" onto things in the 1990s if they used COM or ActiveX, e.g. Active Desktop, Active Channels, ActiMates, Active Directory, ActiveSync, etc).
  • Additionally Entity Framework Core is still lacking a lot of functionality from Entity Framework 6, this is because it's a rewrite, basically - but it will reach parity eventually.

So in order to make everything better, Microsoft introduced .NET Standard which is basically a reboot of the Portable Class Library concept: where Visual Studio projects target a known subset of common functionality instead of a specific implementation. (I just wish they'd start the version numbering from 4 to match .NET Framework instead of starting at 1.0 because that got me thinking about 2001 all over again.) - but the important part is that ASP.NET Core targets .NET Standard instead of .NET Core - which means that ASP.NET Core runs on top of the .NET Framework on Windows in addition to running on top of .NET Core as well.

In summary:

  • ASP.NET MVC 5 was a short-lived successor to ASP.NET MVC 4, released alongside ASP.NET Web API 2. It actually ran on top of ASP.NET 4 (i.e. .NET 4.x version of System.Web.dll). The platform ASP.NET MVC is now obsolete.
  • ASP.NET 5 was EOL'd and rebranded as ASP.NET Core and it includes the functionality of "ASP.NET MVC 5" built-in.
  • ASP.NET Core can run on either .NET Core (cross-platform) or .NET Framework (Windows) because it targets .NET Standard.

All of them (in chronological order):

  • ASP.NET 1 - 2001. Included WebForms. Ran on .NET Framework 1.0 and 1.1. System.Web.dll.
  • ASP.NET 2.0 - 2005. Included WebForms. Ran on .NET Framework 2.0. System.Web.dll.
  • ASP.NET MVC 1 and ASP.NET MVC 2 - 2008-2009. Ran on top of ASP.NET 2.0. System.Web.Mvc.dll.
  • ASP.NET 4.0 - 2010. Included WebForms. Ran on .NET Framework 4.0. There was no ASP.NET 3.0. System.Web.dll.
  • ASP.NET MVC 3 and ASP.NET MVC 4 - 2010-2013. Ran on top of ASP.NET 4.0. System.Web.Mvc.dll.
  • ASP.NET Web Api 1 - 2012. Ran on top of ASP.NET 4.0. System.Web.Http.dll.
  • ASP.NET MVC 5 - 2013. Just another update to ASP.NET MVC. Ran on top of ASP.NET 4.0 but could also run independently without System.Web.dll under OWIN.
  • ASP.NET Web API 2 - 2013. Sibling to ASP.NET MVC 5. Could also run without ASP.NET 4.0 under OWIN.
  • ASP.NET MVC 6 - 2014-2015. Aborted after reaching Release Candidate status and rebooted as ASP.NET Core MVC 1.0 in 2016 which is the MVC and Web API component of ASP.NET Core 1.
  • ASP.NET 5 - 2014. Major reboot of ASP.NET described here. The main changes included merging MVC, Web Pages and Web API - and the removal of WebForms. ASP.NET 5 reached Release Candidate status but was then rebranded as ASP.NET Core. There has never been an ASP.NET 6.
  • ASP.NET Core 1 - 2016. Runs on either .NET Framework 4.5 or .NET Core 1.0.
  • .NET Core - 2016. Portable and minimal .NET runtime and class library.
  • .NET Standard - 2017. A way for programs to target a common set of functionality that will be present in all .NET implementations (.NET Framework 4.5 and later, .NET Core 2.0 and later, Xamarin, etc).
  • ASP.NET Core 2 - 2017-2018: where we are today. Runs on either .NET Framework 4.6.1 or .NET Core 2.0.

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: