What will happen to the Microsoft.AspNetCore.* namespace in ASP.NET 5.0?

痴心易碎 提交于 2021-01-07 03:35:27

问题


.NET 5.0 will replace .NET Core 3.x when it is released in November—and, thus, ASP.NET 5.0 will replace ASP.NET Core 3.x.

Edit: This question is based on a fundamentally incorrect assumption. While the next version of .NET Core will, in fact, be .NET 5.0, the next version of ASP.NET Core will be ASP.NET Core 5.0. See the answers from @Camilo-Terevinto and @omajid for details.

Despite this, as of Preview 8 (8.20414.8), packages, assemblies, and namespaces still contain AspNetCore in their names. For example, see the following NuGet packages:

  • Microsoft.AspNetCore.Http.Features
  • Microsoft.AspNetCore.Authorization
  • Microsoft.AspNetCore.DataProtection
  • Microsoft.AspNetCore.Razor.Language

If you go to the documentation for e.g. the Microsoft.AspNetCore.Http.Features namespace on docs.microsoft.com, however, you'll be redirected back to the ASP.NET Core 3.1 documentation with the warning:

The requested page is not available for ASP.NET Core 5.0 Preview. You have been redirected to the newest product version this page is available for.

Question: Do we have any evidence of what these packages, assemblies, and namespaces will be named in the .NET 5.0 release? Will they remain Microsoft.AspNetCore for backward compatibility, as the current namespaces suggest? Will they become Microsoft.AspNet for consistency with the product name, as the documentation suggests? Or does this remain TBD?


Background: Like other developers, I am working on the .NET 5.0 version of an open source library, and we aim to follow the same naming conventions as the underlying framework for the sake of familiarity, discovery, and consistency.


回答1:


and, thus, ASP.NET 5.0 will replace ASP.NET Core 3.x.

That is not accurate, ASP.NET Core 5.0 will replace ASP.NET Core 3.x. The moniker that will change is .NET Core to .NET. Migration guide ASP.NET Core 3.x to ASP.NET Core 5.0.

Basically:

  • .NET Framework 4.8 -> .NET 5
  • .NET Core 3.1 -> .NET 5
  • ASP.NET Core 3.1 -> ASP.NET Core 5



回答2:


thus, ASP.NET 5.0 will replace ASP.NET Core 3.x.

No, it won't. It's an unfortunate point of confusion, but it's not true.

Let me quote David Fowler, who is one of the ASP.NET Core architects:

There's no plan to change asp.net core to asp.net.

.NET Core becomes .NET 5, but ASP.NET Core stays as ASP.NET Core.



来源:https://stackoverflow.com/questions/63733500/what-will-happen-to-the-microsoft-aspnetcore-namespace-in-asp-net-5-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!