ASP.NET 5.0 中的 Microsoft.AspNetCore.* 命名空间会发生什么? [英] What will happen to the Microsoft.AspNetCore.* namespace in ASP.NET 5.0?

查看:25
本文介绍了ASP.NET 5.0 中的 Microsoft.AspNetCore.* 命名空间会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.NET 5.0 将在以下情况下取代 .NET Core 3.x它于 11 月发布 - 因此,ASP.NET 5.0 将取代 ASP.NET Core 3.x.

<块引用>

这个问题基于一个根本不正确的假设.虽然 .NET Core 的下一版本实际上是 .NET 5.0,但 ASP.NET Core 的下一版本将是 ASP.NET Core 5.0.查看来自 @Camilo-Terevinto@omajid 了解详情.

尽管如此,从 预览 8 (8.20414.8),包、程序集和命名空间的名称中仍包含 AspNetCore.例如,请参阅以下 NuGet 包:

如果你去例如文档Microsoft.AspNetCore.Http.Features 命名空间 在 docs.microsoft.com 上,但是,您将被重定向回 ASP.NET Core 3.1 文档并显示警告:><块引用>

请求的页面不可用于 ASP.NET Core 5.0 预览版.您已被重定向到此页面可用的最新产品版本.

问题: 我们是否有任何证据表明这些包、程序集和命名空间将在 .NET 5.0 版本中命名?它们是否会保持 Microsoft.AspNetCore 向后兼容,正如当前的命名空间所建议的那样?为了与产品名称保持一致,它们是否会像 文档 所暗示的那样成为 Microsoft.AspNet?或者这是否仍待定?


背景和其他开发人员一样,我正在开发一个开源库的 .NET 5.0 版本,为了熟悉起见,我们的目标是遵循与底层框架相同的命名约定,发现和一致性.

解决方案

因此,ASP.NET 5.0 将取代 ASP.NET Core 3.x.

这不准确,ASP.NET Core 5.0 将取代 ASP.NET Core 3.x.将更改的绰号是 .NET Core 到 .NET.从 ASP.NET Core 3.x 到 ASP.NET Core 5.0 的迁移指南.

基本上:

  • .NET 框架 4.8 ->.NET 5
  • .NET Core 3.1 ->.NET 5
  • ASP.NET Core 3.1 ->ASP.NET 核心 5

.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:

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.

解决方案

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

这篇关于ASP.NET 5.0 中的 Microsoft.AspNetCore.* 命名空间会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆