There was a time that I thought the current non-beta ASP.NET claimed the version number of the current .NET CLR (2.0), even though the .NET Framework was version 3.5. Whenever I saw "ASP.NET 3.5", I felt that whomever had written it was incorrect.
However, I'm starting to feel that I'm incorrect. Has the official ASP.NET version number changed from 2.0 to 3.5 (during the time that the .NET Framework version has been 3.5), or has it always officially been "ASP.NET 3.5" (and I've been an idiot)?
In terms of the CLR, there is only 2.0; in terms of the libraries, there are definite changes in ASP.NET in the .net Framework versions 2.0, 3.0, 3.5 and 3.5 SP1 (see MSDN, for example).
Since there are feature changes, I would call it "ASP.NET 3.5".
However, to make things worse, the drop-down box in IIS where you can select either "1.1..." or "2.0...." is called "ASP.NET version". Of course, IIS is referring to the CLR version here.
I've been unable to find an "official" statement on this (I haven't looked hard, though). Microsoft seems to avoid this problem. In the above MSDN link, they write about "ASP.NET Enhancements in .net Framework 3.5 SP1".
So, strictly speaking, I guess ASP.NET does not have a version number, just like WinForms does not have a version number or System.String does not have a version number. "ASP.NET 3.5" is just an informal abbreviation for the ASP.NET part of the .net Framework 3.5 libraries.
Yes, ASP.NET 2.0 and ASP.NET 3.5 are different. 3.5 is the most current non-beta release. Both 2.0 and 3.5 use the 2.0 runtime environment.
Related
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.
(This answer is regularly updated whenever a new .NET announcement is made, and it has been updated with details of ASP.NET Core 3.0, .NET 3, and .NET 5)
Microsoft needs a good slapping for the amount of confusion over the past 3 years 5 years over .NET Core / DNX, ASP.NET Core, .NET Standard, .NET 5 and the rest.
(and I'm saying that as a former FTE SE in DevDiv... ("hi from building 16!"))
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 most 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.
I do note that ASP.NET MVC 5 was where we had both System.Web.Mvc and Microsoft.Web.Mvc namespaces - which is confusing. Fortunately this was short-lived and irrelevant today.
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 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.
.NET Core is a new version of the CLR and BCL which is explicitly portable and runs on Windows, Linux and macOS.
.NET Core 1.0 and .NET Core 2.0's base class libraries were considered anemic compared to the full-fat .NET Framework which is a Windows-exclusive.
With .NET Core 3.0 and the open-sourcing of WinForms, WPF and other components of .NET Framework, .NET Core is now primed as a replacement for .NET Framework in Windows for new application development.
.NET 5 will be the new name of .NET Core after .NET Core 3 is released (.NET 5 is expected around late 2020).
.NET 5 has absolutely nothing to do with ASP.NET 5.0 nor ASP.NET MVC 5.
There is no .NET Core 4 nor .NET Framework 5.0.
"ASP.NET Core in .NET" seems to be the final name for the first release of ASP.NET Core specifically targeting .NET 5 and later.
I note that "Core" is Microsoft's hot branding 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.
Because there are many .NET runtimes and BCLs currently available (.NET Framework, .NET Core, UWP, Xamarin (which uses Mono), Unity and others) 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 1 and ASP.NET Core 2 target .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.
I note that all previous .NET cross-platform compatibility techniques are now obsolete (including targeting Compact Framework subsets, Portable Class Libraries, and even "Shared Projects" in Visual Studio), as they were meant for other editions of .NET which no-longer exist, such as .NET Compact Framework, XNA, Silverlight, and Windows Phone 7's subset.
In May 2019, Microsoft announced ".NET 5". In short, the .NET Framework is being replaced with .NET Core, and the next version of .NET Core after .NET Core 3.0 will be named .NET 5). This announcement does not concern ASP.NET Core at all, other than the fact that .NET 5 will fully support ASP.NET Core 3.0 applications running on it.
Throughout the Covid-themed summer of 2020 Microsoft finalized .NET 5 and ASP.NET Core. As of October 2020, ASP.NET Core's NuGet package versions have jumped from 3.1.x to 5.0.0 - so it looks as though the next major release of ASP.NET Core will be versioned 5.x.x which suggests its release may be named "ASP.NET Core 5" though recent Microsoft blog articles suggest the name will be "ASP.NET Core for .NET 5" - though given that this whole thread was created out of the confusion over "ASP.NET MVC 5" vs "ASP.NET 5" I'm sure that naming it either "ASP.NET Core 5" or "ASP.NET Core for .NET 5" will absolutely not be confusing at all, no sir-ee-bob!
In summary:
ASP.NET MVC 5:
ASP.NET MVC 5 was a short-lived successor to ASP.NET MVC 4.
It was released alongside ASP.NET Web API 2 in 2014.
It actually ran on top of ASP.NET 4 (i.e. .NET 4.x version of System.Web.dll). Note that the entire ASP.NET MVC library 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 1 and ASP.NET Core 2 can run on either .NET Core (cross-platform) or .NET Framework (Windows) because it targets .NET Standard.
ASP.NET Core 3 now only runs on .NET Core 3.0.
ASP.NET Core 4 does not exist and never has.
ASP.NET Core 5 exists (as of August 2020) however its official name seems to be "ASP.NET Core for .NET 5" and it only runs on .NET 5.
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. (As of late 2018 there is now ASP.NET Core 2.1).
ASP.NET Core 3 - In late October 2018 Microsoft announced ASP.NET Core 3.0 will now only run on the upcoming .NET Core 3.0 (so it will no-longer run on the .NET Framework 4.7.x). This is a controversial move because it means there is now no upgrade path from ASP.NET Core 2.x to ASP.NET Core 3.x for applications that run on the .NET Framework 4.7.x because of dependencies that don't support .NET Core yet, which means there likely won't be a .NET Standard 3.0.
.NET 5 - May 2019: Microsoft announced the next version of .NET Core after .NET Core 3.1 would not be called ".NET Core 4.0" nor ".NET Core 5.0" but would jump to version number 5.0 and ditch the "Core" branding, hence ".NET 5.0".
ASP.NET Core 3.0 on .NET 5 - In the May 2019 announcement of .NET 5, Microsoft also stated that ASP.NET Core 3.0 applications will run on .NET 5. It is currently unclear if ASP.NET Core 2.x applications will be able to run unmodified on .NET 5.
ASP.NET Core vNext on .NET 5 - August 2020: With the impending release of .NET 5, Microsoft has bumped the version numbers of the NuGet packages for ASP.NET Core to 5.0.0. Microsoft has not yet formally/officially referred to this new release of ASP.NET Core as "ASP.NET Core 5", but I see it as a foregone conclusion.
ASP.NET Core for .NET 5 A more recent blog article from September 2020 suggests that Microsoft is referring to the next version of ASP.NET Core as "ASP.NET Core for .NET 5" (yes, that's a mouthful - at least it isn't as ambiguous as earlier names).
Update (September 2021): It seems that the official name is now ASP.NET Core in .NET 5, and for .NET 6 it seems they've gone with ASP.NET Core in .NET 6 as well.
Timeline and block diagram
(I got carried away making this...)
This answer will try to focus only on ASP.NET MVC 5, and as little ASP.NET Core as possible.
Product Lifecycle
Microsoft still supports this (so fortunately it is not a "short-lived" release from the other answer), and there is not yet an end-of-life announcement,
https://www.asp.net/support
Framework/Product Retirement
ASP.NET MVC 4 July 1st, 2019
ASP.NET MVC 5
So if you like, you can keep using it (like VB6 and classic ASP users, who are still being supported by Microsoft).
.NET Framework 4.5.2 and above are still fully supported if you do check Microsoft documentation on product lifecycle.
Maintenance
However, you do need to notice ASP.NET MVC 5 is on maintenance mode, as development resources are almost all on ASP.NET Core right now.
You do get,
Unpredictable patch releases from NuGet.org.
If you monitor the relevant NuGet packages, you should notice that even recently Microsoft updates them to remediate security vulnerabilities and so on.
Locked down documentation.
The notice you saw from Microsoft Docs, in fact emphasizes on the very first sentence "We’re no longer updating this content regularly." That makes perfectly sense as ASP.NET MVC 5 is rock solid so you should not expect new materials to be added any more.
Very limited bug fixes and new features.
You said "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."
Well, it really depends on what "bugs" you are talking about. Like I said earlier, security related issues are still being patched, but bugs with workarounds or functional limitation are least likely to get fixed. It is an open source project, so if you really want, you can fix the issues on your own, as last resort.
On new features side, Microsoft does backport some features from ASP.NET Core, such as dependency injection, new configuration system, to simplify migration at certain degree. But don't expect much.
Migration
Do consider migrating to ASP.NET Core if you can.
I found this fragment from the introduction to this article in Wikipedia to be a great sum up of the great answer provided here as the selected answer. The same was originated in this Microsoft's blog post: https://devblogs.microsoft.com/dotnet/introducing-net-5/
(I'll link every technology mentioned, where possible, to its own Wikipedia article, for further reading.)
Final release of ASP.NET MVC: 28 November 2018. ASP.NET Core has since been released, which unified ASP.NET, ASP.NET MVC, ASP.NET Web API, and ASP.NET Web Pages (a platform using only Razor pages). MVC 6 was abandoned due to Core and is not expected to be released. Core is currently planned to merge into ".NET 5".
Is a server which returns 2.0.50727.4200 for System.Environment.Version going to support ASP.NET 3.5?
The webhost claims I should ignore the details in the control panel but I get 2.0.50727.4200 when checking the aforementioned system variable.
This article should make things clearer: http://www.west-wind.com/Weblog/posts/289139.aspx
In short, just because it says it's version 2.0, doesn't mean it isn't actually running 3.5. v3.0 and v3.5 are essentially updates to v2.0
The CLR for 3.5 is still 2.0, so no, you're not being screwed, it will be fine.
.NET 4.0 will have a 4.0 CLR, so when you're promised .NET 4.0, you can look for a number higher than 2.0.
The runtime for ASP.NET 3.5 is still 2.0
It will be upgraded to 4.0 when .NET 4 is released.
Don't ask my why that is, but ASP.NET MVC will work.
asp.net is version 2....
the MVC stuff in 3.+ just extends the base of v2....so that is an expected result. as the core of asp.net is still at 2.*... you will be able to run mvc
Microsoft provides a number of command line tools for working with asp.net applications. I haven't had any trouble using these tools. One thing that I can not understand though, is the location of these tools.
Even for applications targeting newer versions of .net, these tools are located in the .net v2 directory. On my machine, that's C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727. Why do these tools not exist in the v3.0 or v3.5 directories? And why do the ones in the older directory work on the newer framework?
This is more of an idle curiosity than required knowledge for me, but I would like to know.
Update:
Thanks for the good answers everyone. These answers raise a new question though. I hope you will forgive me for asking it here, since it is so highly related. If .net 3.5 is really just using the CLR from 2.0, why is 2.0 compatible with Windows 2000, but not 3.5? It would seem to me that if the updates in 3.0 and 3.5 run inside the framework of the earlier version, then they must maintain compatibility with the same platforms as the earlier version too. Why is this wrong?
.NET 3.0 and 3.5 are (basically) just library additions to the 2.0 framework.
The addition of .NET 3.0 didn't mean new compilers or a new CLR. Instead, it's three major new libraries: WCF (Windows Communication Foundation née Indigo), WPF (Windows Presentation Foundation née Avalon) and Windows Workflow or WF.
Basically, remember Framework version != CLR Version. If you configured an IIS Application to use .NET 2.0, you're talking about the 2.0 CLR. WCF Applications use the .NET 2.0 CLR with the new 3.0 WCF libraries.
* .NET Framework 1.x = CLR 1.x
* .NET Framework 2.0 = CLR 2.0
* .NET Framework 3.0 = CLR 2.0
* .NET Framework 3.5 = CLR 2.0 + (C# 3.0 | VB9)
Edit:
To answer your second question, .NET 3.0 and 3.5 have new libraries which reference OS-level features like WPF, which isn't available on Windows 2000. If you write an application in 3.5* but only use functionality and libraries that were also available in 2.0, it can still work on Windows 2000.
*by "in 3.5", we mean write it in Visual Studio 2008 under 3.5 but set your Project Target Framework to 2.0. Scott Hanselman talks about doing this to get ASP.NET MVC to work on .NET 2.0.
It is because the core of .Net has not actually been changed since v2.0. MS marketing types were much derided at the time for forcing the naming scheme in use, where .Net 3, and .Net 3.5 are really just adding additional libraries that run on the .Net 2 core.
Check out Scott Hanselman's blog post for more details.
Because .NET 3.0 and 3.5 are applications of .NET 2.0, not complete, standalone frameworks unto themselves. This is further see in the IIS config, where you only have the option to select .NET 1.0, .NET 1.1, and .NET 2.0. You web.config file will include any .NET 3.0 or .NET 3.5 assemblies as these are written, ultimately, with .NET 2.0 code. More details about that can be seen here: http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx
Of course, that all changes in .NET 4.0 which will be a completely "new version" of the framework.
v3.0 and v3.5 still uses the v2 DLLs for the core files. Most of the changes are additions to the v2 framework as well as a new compiler for 3.5.
In a web site targeted for Framework 3.5, on a machine with up to 3.5 SP 1 installed, when I call System.Environment.Version in a page, it reports 2.0.50727.3053. Can anyone suggest why this happens?
It is telling you the CLR version, which is still 2.0x; it jumps to 4.0x in .NET 4.0 - but until then, all of .NET 2.0, .NET 3.0 and .NET 3.5 share a CLR version (give-or-take the small numbers ;-p)
Because the underlying CLR for .NET framework 3.5 is still 2.0.50727.3053.
.NET 3.0 and 3.5 are additions to .NET 2.0 - the underlying CLR is still the same.
This will change with .NET 4.0 with a new CLR 4.0.
Marc
The MSDN docs for Environment.Version say this:
Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.
The CLR version in 3.5 SP1 is still 2.0.
Hence, no error, it behaves exactly as documented.
I am currently aware that ASP.NET 2.0 is out and about and that there are 3.x versions of the .Net Framework.
Is it possible to upgrade my ASP.NET web server to version 3.x of the .Net Framework?
I have tried this, however, when selecting which version of the .Net framwork to use in IIS (the ASP.NET Tab), only version 1.1 and 2.0 show.
Is there a work around?
if I install 3.5 and have IIS setup to use 2.0. I will be able to use 3.5 features?
Yes, that is correct. You have IIS set to 2.0 for both 2.0 and 3.5 sites, as they both run on the same CLR. 3.5 uses a different compile method than 2.0. This is declared in the web.config for the site. See this post for more details on this. But the setup in IIS for both 3.5 and 2.0 ASP.net sites is identical.
Unfortunately, the statement .NET versions can be installed side-by-side, so it won't disrupt any "legacy" apps isn't entirely true. If you install 3.5, it requires 2.0 SP1, which can disrupt legacy applications that uses 2.0 and connects to Oracle database servers.
Sure, download the 3.5 redistributable, install it on the servre, and you're good to go. .NET versions can be installed side-by-side, so it won't disrupt any "legacy" apps.
http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en
GateKiller,
.NET 3.0 and .NET 3.5 did not change the version of the CLR, so "using ASP.NET 3.5" is a more complicated thing that it sounds like it should be at first. In essence, you're still running on the 2.0 CLR, but you're using the C# 3.0 compiler and linking against the 3.5 libraries. It means adding a bunch of stuff to your Web.config file to become an ASP.NET 3.5 project.
Scott Hanselman has an awesome blog post covering the details:
http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx
The version you are selecting in IIS is the version of the CLR to use. There are only two versions of the CLR. The .NET Framework 3.5 runs on CLR 2.0
The new framework is .Net 3.5, you'll have a new assembly System.Core, + a few more if you use features like Linq
.Net 3.5 comes with the new C#3.0 compiler
ASP.Net is still version 2.0
Lovely and confusing isn't it ;-)
You should upgrade the .Net framework on the server to .Net 3.5 SP1, but you're still going to be running ASP.Net 2.0