简体   繁体   English

为什么在 Nuget 上找到的包不是最新版本?

[英]Why is the package found on Nuget not the latest version?

Why do I add packages such as Microsoft.AspNetCore.Http.Extensions to the .net core3.1 class library project, but only the 2.2 version can be found?为什么我在.net core3.1类库项目中添加了Microsoft.AspNetCore.Http.Extensions等包,却只能找到2.2版本?

在此处输入图片说明

In the class library project of the same solution, the same version of these two packages cannot be found on nuget.在同一个方案的类库项目中,在nuget上找不到这两个包的相同版本。

thanks谢谢

TLDR - it is at the latest version. TLDR - 它是最新版本。

Visit the nuget page of Microsoft.AspNetCore.Http.Extensions here: : https://www.nuget.org/packages/Microsoft.AspNetCore.Http.Extensions/在此处访问Microsoft.AspNetCore.Http.Extensions的 nuget 页面: https://www.nuget.org/packages/Microsoft.AspNetCore.Http.Extensions/

You'll notice that the most recent version is indeed 2.2.0您会注意到最新版本确实是2.2.0

Why is that?这是为什么? Nuget packages reference each other with requirements. Nuget 包与需求相互引用。 So a package with a version XYZ might well require another library of STU version, with the two version numbers being vastly different.所以一个版本为 XYZ 的包可能需要另一个 STU 版本的库,这两个版本号有很大的不同。 Raising the version of one, doesn't mean that there will be a need to raise the other too.提高一个版本,并不意味着也需要提高另一个。

In semantic versioning the numbers (usually) just indicate the following在语义版本控制中,数字(通常)仅表示以下内容

XYZ XYZ

X. Major version. X. 主要版本。 If this changes, then there are breaking changes in the update Y. Minor version.如果此更改,则更新 Y. 次要版本中会有重大更改。 If this changes, it is only additional functionality added, and you can update in the safety of knowing that your code won't break.如果这种情况发生变化,它只是添加了附加功能,并且您可以安全地进行更新,因为您知道您的代码不会中断。 Z. Patch version. Z.补丁版本。 This is usually just bug fixes and performance enhancements.这通常只是错误修复和性能增强。

For ASP.NET Core 3 this package is no longer produced.对于 ASP.NET Core 3,不再生成此包。 See Migrate from ASP.NET Core 2.2 to 3.0 - Remove obsolete package references请参阅从 ASP.NET Core 2.2 迁移到 3.0 - 删除过时的包引用

So you don't need it for ASP.NET Core 3 and this is enough:所以你不需要它用于 ASP.NET Core 3,这就足够了:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>

</Project>

large number of NuGet packages aren't produced for ASP.NET Core 3.0.大量 NuGet 包不是为 ASP.NET Core 3.0 生成的。 Such package references should be removed from your project file.此类包引用应从您的项目文件中删除。

... ...

To see the full list of packages that are no longer produced ...要查看不再生产的软件包的完整列表...

  • Microsoft.AspNetCore微软.AspNetCore
  • Microsoft.AspNetCore.All微软.AspNetCore.All
  • Microsoft.AspNetCore.App微软.AspNetCore.App
  • Microsoft.AspNetCore.Antiforgery Microsoft.AspNetCore.Antiforgery
  • Microsoft.AspNetCore.Authentication Microsoft.AspNetCore.Authentication
  • Microsoft.AspNetCore.Authentication.Abstractions Microsoft.AspNetCore.Authentication.Abstractions
  • Microsoft.AspNetCore.Authentication.Cookies Microsoft.AspNetCore.Authentication.Cookies
  • Microsoft.AspNetCore.Authentication.Core Microsoft.AspNetCore.Authentication.Core
  • Microsoft.AspNetCore.Authentication.OAuth Microsoft.AspNetCore.Authentication.OAuth
  • Microsoft.AspNetCore.Authorization.Policy Microsoft.AspNetCore.Authorization.Policy
  • Microsoft.AspNetCore.CookiePolicy Microsoft.AspNetCore.CookiePolicy
  • Microsoft.AspNetCore.Cors微软.AspNetCore.Cors
  • Microsoft.AspNetCore.Diagnostics Microsoft.AspNetCore.Diagnostics
  • Microsoft.AspNetCore.Diagnostics.HealthChecks Microsoft.AspNetCore.Diagnostics.HealthChecks
  • Microsoft.AspNetCore.HostFiltering Microsoft.AspNetCore.HostFiltering
  • Microsoft.AspNetCore.Hosting Microsoft.AspNetCore.Hosting
  • Microsoft.AspNetCore.Hosting.Abstractions Microsoft.AspNetCore.Hosting.Abstractions
  • Microsoft.AspNetCore.Hosting.Server.Abstractions Microsoft.AspNetCore.Hosting.Server.Abstractions
  • Microsoft.AspNetCore.Http微软.AspNetCore.Http
  • Microsoft.AspNetCore.Http.Abstractions Microsoft.AspNetCore.Http.Abstractions
  • Microsoft.AspNetCore.Http.Connections Microsoft.AspNetCore.Http.Connections
  • Microsoft.AspNetCore.Http.Extensions Microsoft.AspNetCore.Http.Extensions
  • Microsoft.AspNetCore.HttpOverrides Microsoft.AspNetCore.HttpOverrides
  • Microsoft.AspNetCore.HttpsPolicy Microsoft.AspNetCore.HttpsPolicy
  • Microsoft.AspNetCore.Identity Microsoft.AspNetCore.Identity
  • Microsoft.AspNetCore.Localization Microsoft.AspNetCore.Localization
  • Microsoft.AspNetCore.Localization.Routing Microsoft.AspNetCore.Localization.Routing
  • Microsoft.AspNetCore.Mvc微软.AspNetCore.Mvc
  • Microsoft.AspNetCore.Mvc.Abstractions Microsoft.AspNetCore.Mvc.Abstractions
  • Microsoft.AspNetCore.Mvc.Analyzers Microsoft.AspNetCore.Mvc.Analyzers
  • Microsoft.AspNetCore.Mvc.ApiExplorer Microsoft.AspNetCore.Mvc.ApiExplorer
  • Microsoft.AspNetCore.Mvc.Api.Analyzers Microsoft.AspNetCore.Mvc.Api.Analyzers
  • Microsoft.AspNetCore.Mvc.Core Microsoft.AspNetCore.Mvc.Core
  • Microsoft.AspNetCore.Mvc.Cors Microsoft.AspNetCore.Mvc.Cors
  • Microsoft.AspNetCore.Mvc.DataAnnotations Microsoft.AspNetCore.Mvc.DataAnnotations
  • Microsoft.AspNetCore.Mvc.Formatters.Json Microsoft.AspNetCore.Mvc.Formatters.Json
  • Microsoft.AspNetCore.Mvc.Formatters.Xml Microsoft.AspNetCore.Mvc.Formatters.Xml
  • Microsoft.AspNetCore.Mvc.Localization Microsoft.AspNetCore.Mvc.Localization
  • Microsoft.AspNetCore.Mvc.Razor Microsoft.AspNetCore.Mvc.Razor
  • Microsoft.AspNetCore.Mvc.Razor.ViewCompilation Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
  • Microsoft.AspNetCore.Mvc.RazorPages Microsoft.AspNetCore.Mvc.RazorPages
  • Microsoft.AspNetCore.Mvc.TagHelpers Microsoft.AspNetCore.Mvc.TagHelpers
  • Microsoft.AspNetCore.Mvc.ViewFeatures Microsoft.AspNetCore.Mvc.ViewFeatures
  • Microsoft.AspNetCore.Razor微软.AspNetCore.Razor
  • Microsoft.AspNetCore.Razor.Runtime Microsoft.AspNetCore.Razor.Runtime
  • Microsoft.AspNetCore.Razor.Design Microsoft.AspNetCore.Razor.Design
  • Microsoft.AspNetCore.ResponseCaching Microsoft.AspNetCore.ResponseCaching
  • Microsoft.AspNetCore.ResponseCaching.Abstractions Microsoft.AspNetCore.ResponseCaching.Abstractions
  • Microsoft.AspNetCore.ResponseCompression Microsoft.AspNetCore.ResponseCompression
  • Microsoft.AspNetCore.Rewrite Microsoft.AspNetCore.Rewrite
  • Microsoft.AspNetCore.Routing Microsoft.AspNetCore.Routing
  • Microsoft.AspNetCore.Routing.Abstractions Microsoft.AspNetCore.Routing.Abstractions
  • Microsoft.AspNetCore.Server.HttpSys Microsoft.AspNetCore.Server.HttpSys
  • Microsoft.AspNetCore.Server.IIS微软.AspNetCore.Server.IIS
  • Microsoft.AspNetCore.Server.IISIntegration Microsoft.AspNetCore.Server.IISIntegration
  • Microsoft.AspNetCore.Server.Kestrel Microsoft.AspNetCore.Server.Kestrel
  • Microsoft.AspNetCore.Server.Kestrel.Core Microsoft.AspNetCore.Server.Kestrel.Core
  • Microsoft.AspNetCore.Server.Kestrel.Https Microsoft.AspNetCore.Server.Kestrel.Https
  • Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions
  • Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
  • Microsoft.AspNetCore.Session Microsoft.AspNetCore.Session
  • Microsoft.AspNetCore.SignalR Microsoft.AspNetCore.SignalR
  • Microsoft.AspNetCore.SignalR.Core Microsoft.AspNetCore.SignalR.Core
  • Microsoft.AspNetCore.StaticFiles Microsoft.AspNetCore.StaticFiles
  • Microsoft.AspNetCore.WebSockets Microsoft.AspNetCore.WebSockets
  • Microsoft.AspNetCore.WebUtilities Microsoft.AspNetCore.WebUtilities
  • Microsoft.Net.Http.Headers Microsoft.Net.Http.Headers

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM