我迷路了。 ASP.NET MVC 5发生了什么? [英] I'm lost. What happened to ASP.NET MVC 5?
问题描述
我一直在努力处理各种项目,显然Microsoft一直在忙于进行一些重大更改,这使我感到困惑。去年我安装Visual Studio 2017并去创建一个新项目时,ASP.NET Core首次引起了我的注意,突然选择了.NET Framework,.NET Standard和.NET Core。因此,我仔细研究了一下它们,发现后两者在某种程度上是完整框架的缩写版本。我阅读了Scott Hanselman的这篇文章 ASP.NET 5已死-引入ASP.NET Core 1.0和.NET Core 1.0 我也发现了这一点,这使我远离了ASP.NET Core:在ASP.NET和ASP.NET Core之间进行选择。我的观点是 Core是新的,您可以继续使用完整的框架。因此,我使用.NET Framework 4.6.2和Microsoft.AspNet.Mvc 5.2.3创建了一个新的ASP.NET MVC网站。
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.
自创建该项目以来,我发现MVC和Entity Framework中似乎都存在一些错误,只是发现在Web上唯一提及它们的地方似乎是Core
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.
现在,我现在正在尝试查找System.Web.Mvc.Controller和System.Web.Mvc.JsonResult,除了核心文档中的内容外,均已消失。我终于将它挖掘了在这里表示不再被维护?
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.
推荐答案
(此答案会在发布新的.NET公告时定期进行更新,并且已更新了ASP.NET Core 3.0,.NET 3和.NET 5的详细信息)
过去三年来,Microsoft需要对.NET Core / DNX,ASP.NET Core,.NET Standard,.NET 5和其他方面的混乱状况给予良好的掌声。
Microsoft needs a good slapping for the amount of confusion over the past 3 years over .NET Core / DNX, ASP.NET Core, .NET Standard, .NET 5 and the rest.
(我是说,作为DevDiv中的前FTE SE ... (来自16号楼的嗨!))
(and I'm saying that as a former FTE SE in DevDiv... ("hi from building 16!"))
- ASP.NET 又名 System.Web已消失。 WebForms已死(哇!)
- ASP.NET MVC 是在ASP.NET之上构建的,但是绕过了大多数WebForms基础结构。
- ASP.NET MVC 具有自己的版本,与 ASP.NET 和 ASP分开.NET Web API (和 ASP.NET Core )。您已链接到 ASP.NET MVC 5 的文档-这与 ASP.NET 5 并不相同。 b $ b
- 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 Core 的类库的根名称空间现在为
Microsoft.AspNet
而不是System.Web
。这让我感到困惑。这意味着将项目从 ASP.NET MVC 和 ASP.NET WebAPI 升级到ASP.NET Core并非易事,尽管其控制器和中间件的基本体系结构相同。
- Note that ASP.NET Core's class library's root namespace is now
Microsoft.AspNet
and notSystem.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 1.0 和 .NET Core 2.0 的基类库,认为它们比较贫乏Windows专有的 fat-fat </ em> .NET Framework 。
- 具有 .NET Core 3.0 以及WinForms,WPF和.NET Framework的其他组件的开源,.NET Core现在可以替代Windows中用于新应用程序开发的.NET Framework。
- .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 与 ASP.NET 5.0完全无关 strong>或 ASP.NET MVC 5 。
- 没有 .NET Core 4 或 .NET Framework 5.0 。
- .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.
我注意到 Core是Microsoft的与.NET Core一起使用的当前.NET平台的热门品牌。(即它们没有Windows依赖关系,因此可移植)。 (就像Microsoft在1990年代使用COM或ActiveX时如何将 Active固定在事物上一样,例如Active Desktop,Active Channels,ActiMate,Active Directory,ActiveSync等)。
-另外, Entity Framework Core 仍然缺少Entity Framework 6的许多功能,这是因为基本上是重写,但最终会达到同等水平。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.
由于当前有许多.NET运行时和BCL(.NET Framework,.NET Core,UWP,Xamarin(使用Mono),Unity等),因此引入了 .NET Standard ,它基本上是对可移植类库概念的重新引导:Visual Studio项目以通用功能的已知子集为目标,而不是特定的实现。 (我只希望他们将版本号从4开始以匹配.NET Framework,而不是从
1.0
开始,因为这让我开始思考 2001 )-但是重要的是, ASP.NET Core 1 和 ASP.NET Core 2 的目标是.NET Standard而不是.NET Core-意味着ASP.NET Core除了可以在.NET Core之上运行之外,还可以在Windows的.NET Framework之上运行。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.我注意到现在,所有以前的.NET跨平台兼容性技术都已过时(包括针对Compact Framework子集,可移植类库,甚至是Visual Studio中的共享项目),因为它们是针对不再存在的其他.NET版本的,例如.NET Compact Framework,XNA,Silverlight和Windows Phone 7的子集。
在2019年5月,微软宣布推出 .NET 5 。简而言之,将 .NET Framework 替换为 .NET Core (具体而言:.NET Core 3.0之后的.NET Core的下一版本将被命名为。 NET 5 )。除了.NET 5将完全支持在其上运行的 ASP.NET Core 3.0 应用程序这一事实外,该公告根本不涉及 ASP.NET Core 。 (ASP.NET Core 4可能会在那时发布)
In May 2019, Microsoft announced ".NET 5". In short, the .NET Framework is being replaced with .NET Core (specifically: 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. (ASP.NET Core 4 will probably be released by then anyway)
- ASP.NET MVC 5 是与 ASP一起发布的 ASP.NET MVC 4 的短暂后继。 NET Web API 2 。它实际上是在 ASP.NET 4 (即
System.Web.dll
的.NET 4.x版本)之上运行的。平台 ASP.NET MVC 现在已过时。 - ASP.NET 5 已停产,并更名为 ASP .NET Core ,它包含内置的 ASP.NET MVC 5功能。
- ASP.NET Core 1 和 ASP.NET Core 2 可以在.NET Core(跨平台)或.NET Framework(Windows)上运行,因为它的目标是.NET Standard。
- ASP.NET Core 3 现在仅可在 .NET Core 3.0 上运行。
- 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 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 1 -2001。包括了 WebForms 强>。跑.NET Framework 1.0和1.1。
System.Web.dll
。 - ASP.NET 2.0 -2005。包含的 WebForms 。在.NET Framework 2.0上运行。
System.Web.dll
。 - ASP.NET MVC 1 和 ASP.NET MVC 2 -2008-2009。跑在ASP.NET 2.0之上。
System.Web.Mvc.dll
。 - ASP.NET 4.0 -2010。包含的 WebForms 。在.NET Framework 4.0上运行。没有 ASP.NET 3.0 。
System.Web.dll
。 - ASP.NET MVC 3 和 ASP.NET MVC 4 -2010-2013。跑在ASP.NET 4.0之上。
System.Web.Mvc.dll
。 - ASP.NET Web Api 1 -2012。 ASP.NET 4.0 的顶部。
System.Web.Http.dll
。 - ASP.NET MVC 5 -2013。只是另一个更新到 ASP.NET MVC 。在 ASP.NET 4.0 之上运行,但也可以在OWIN下运行
System.Web.dll
独立运行。 - ASP.NET Web API 2 -2013。同级为 ASP.NET MVC 5 。在OWIN下也可以在没有 ASP.NET 4.0 的情况下运行。
- ASP.NET MVC 6 -2014-2015。在达到候选版本状态后中止,并在 ASP.NET Core MVC 1.0 中重新启动,这是 ASP.NET Core 1 的MVC和Web API组件。
- ASP.NET 5 -2014年。ASP.NET此处描述。主要更改包括合并MVC,Web页和Web API-以及删除 WebForms 。 ASP.NET 5达到了候选发布状态,但随后更名为 ASP.NET Core 。从来没有一个 ASP.NET 6 。
- ASP.NET Core 1 -2016。可以在两个上运行。 NET Framework 4.5 或 .NET Core 1.0 。
- .NET Core -2016。可移植且最小的.NET运行时和类库。
- .NET Standard -2017。这是程序针对一组通用功能的一种方式,该功能将出现在所有.NET实现中(。 NET Framework 4.5及更高版本,.NET Core 2.0及更高版本,Xamarin等)。
- ASP.NET Core 2 -2017-2018:今天的现状。在 .NET Framework 4.6.1 或 .NET Core 2.0 上运行。 (截至2018年底,现在有了ASP.NET Core 2.1。)。
- ASP.NET Core 3 -在Microsoft 2018年10月下旬宣布ASP.NET Core 3.0现在只能在即将推出的.NET Core 3.0 上运行(因此它将不再在.NET Framework 4.7.x上运行)。这是一个有争议的举动,因为这意味着由于不支持依赖项,对于在.NET Framework 4.7.x上运行的应用程序,现在没有从ASP.NET Core 2.x到ASP.NET Core 3.x的升级路径。 .NET Core还没有,这意味着可能不会有.NET Standard 3.0。
- .NET 5上的ASP.NET Core 3.0 -5月Microsoft在2019年发布的 .NET 5 声明中指出,ASP.NET Core 3.0应用程序将在.NET 5上运行。目前尚不清楚ASP.NET Core 2.x应用程序是否能够在未修改的情况下运行。 .NET 5。
- 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.
- ASP.NET Core 3.0 on .NET 5 - In the May 2019 announcement of .NET 5, Microsoft 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 MVC 5发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!