与5.1.0版本ASP.NET的WebAPI 2.1为什么叫ASP.NET的WebAPI包库? [英] Why call ASP.NET WebAPI package libraries with version 5.1.0 as ASP.NET WebAPI 2.1?

查看:155
本文介绍了与5.1.0版本ASP.NET的WebAPI 2.1为什么叫ASP.NET的WebAPI包库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要开始使用ASP.NET MVC和的WebAPI这是2014年1月发布。

I want to get started with ASP.NET MVC and WebAPI that was released in Jan 2014.

ASP.NET MVC 5.1,ASP.NET的Web API 2.1和ASP.NET网页3.1(参考的NuGet)

ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1 (Ref: NuGet)

我创建了一个新的ASP.NET Web应用程序(.NET 4.5.1)>空模板 - >网络API签>无身份验证

I created a new ASP.NET Web application (.NET 4.5.1) > "Empty template" > "Web API" checked > "No Authentication"

根据的NuGet包文件夹,​​我查了一下这个网页API空项目引用的库的版本,发现所有的DLL(除NewtonSoft)是具有类似版本为5.1。

Under the NuGet packages folder I checked the version of libraries referenced by this Web API empty project and found that all DLL (except NewtonSoft) is having a version similar to 5.1..

这是也适用于ASP.NET MVC包。

This is also true for ASP.NET MVC packages.

问:所有的库版本为5.1 ...,事件ASP.NET MVC被称为5.1那么为什么ASP.NET的WebAPI称为2.1 - 它背后的具体原因和历史

Question: All libraries are versioned as 5.1..., event ASP.NET MVC is called 5.1 then why is ASP.NET WebAPI called 2.1 - any specific reason or history behind it?

推荐答案

2.1版本是你应该注意的版本,因为这是的ASP.NET Web API的NuGet包的命名版本正式使用的唯一的号码。

Version 2.1 is the version you should pay attention to, since this is the named version of ASP.NET Web API NuGet packages and the only number used officially.

库版本号5.x的是内部的各个组件库,构成Web API 2.1 - 和5.1不是巧合,因为你已经注意到,因为网络API股所有其他网页内容的共同根源。因此从技术上讲,的ASP.NET Web API有两个不同的版本方案,一个是产品的正式版本,一个是库版本。

The library version numbers 5.x are internal to the individual component libraries that make up Web API 2.1 - and 5.1 is no coincidence, as you've noticed, since Web API shares a common root with all the other web stuff. So technically, ASP.NET Web API has two different versioning schemes, one being the official version of the product, and one being the library versions.

如果你看一下的NuGet包的ASP.NET Web API 2.2,你会看到该URL

If you look at the NuGet package for ASP.NET Web API 2.2, you'll see that the URL is

https://www.nuget.org/packages/ Microsoft.AspNet.WebApi / 5.2.0-RC

这字面意思是,这是ASP.NET的Web API 2.2版本5.2.0 RC,这是令人困惑的。但要想想一个办法是的ASP.NET Web API 2.2作为产品的名称,而5.2.0是产品的内部版本号 - 与Windows 8的(名字)VS的Windows 6.2.9200 (内部版本)。

This means literally that this is ASP.NET Web API 2.2 version 5.2.0 RC, which is confusing. But one way to think about it is as "ASP.NET Web API 2.2" being the name of the product, whereas 5.2.0 is the internal version number of the product - as with Windows 8 (the name) vs Windows 6.2.9200 (the internal version).

这篇关于与5.1.0版本ASP.NET的WebAPI 2.1为什么叫ASP.NET的WebAPI包库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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