Microsoft.Azure.Storage 和 WindowsAzure.Storage Nuget 包之间有什么区别? [英] What is the difference between the Microsoft.Azure.Storage and WindowsAzure.Storage Nuget packages?
问题描述
我一直觉得这很令人困惑:
I've always found this very confusing:
- 有一个由 Microsoft 编写的
WindowsAzure.Storage
NuGet 包,它允许您使用例如 blob 存储(创建 blob 等). - 还有
Microsoft.Azure.Storage.*
包可以完成同样的事情,它们也是由 Microsoft 编写的.
- There is a
WindowsAzure.Storage
NuGet package authored by Microsoft which allows you to work with, for example, blob storage (creating blobs, etc.). - There are also
Microsoft.Azure.Storage.*
packages which accomplish the same thing, also authored by Microsoft.
如果您的项目碰巧对两者都有依赖,则可能会出现命名冲突,例如(类型CloudStorageAccount"同时存在于Microsoft.Azure.Storage.Common, ... 和"Microsoft.WindowsAzure.Storage, ...)中.
If your project happens to have dependencies on both, you can have naming conflicts e.g. (The type 'CloudStorageAccount' exists in both 'Microsoft.Azure.Storage.Common, ... and 'Microsoft.WindowsAzure.Storage, ...).
以下是两个选项的链接:
Here are links to the two alternatives:
https://docs.microsoft.com/en-us/dotnet/api/overview/azure/storage?view=azure-dotnet
https://github.com/Azure/azure-storage-net/blob/master/README.md
有什么区别,我什么时候才会有动力使用一种而不是另一种?
What is the difference and when would I be motivated to use one over the other?
推荐答案
WindowsAzure.Storage
(最新版本是 v9.3.2)是我们一直使用的旧版 Storage SDK,Microsoft.Azure.Storage.*
(最新的 v9.4.0)是它的新版本,nuget 可用大约一年.
WindowsAzure.Storage
(latest is v9.3.2) is the legacy Storage SDK we always use and Microsoft.Azure.Storage.*
(latest v9.4.0) is its new release, nuget available about one year.
检查存储的 changelog.网络开发工具包.列出这些重要差异/变化的一部分.
Check the changelog of Storage .NET SDK. List part of those important differences/changes.
Microsoft.Azure.Storage
将库分成三个部分,Blob、队列和文件,这意味着我们可以安装单独的包而不是完整版.
Microsoft.Azure.Storage
splits libraries to three parts, Blob, Queue and File, which means we can install separate package instead of the full edition.
Microsoft.Azure.Storage
不支持 Table API,它被转移到 Microsoft.Azure.Cosmos.Table.
Microsoft.Azure.Storage
doesn't support Table API, it is transferred to Microsoft.Azure.Cosmos.Table.
Microsoft.Azure.Storage
自 9.4.0 预览版起添加了 NetStandard2.0 目标支持,支持封装在异步 API 上的同步方法.NetStandard 上的 WindowsAzure.Storage
只有异步 API.
Microsoft.Azure.Storage
added NetStandard2.0 target support since 9.4.0-preview, which supports synchronous methods wrapped over the asynchronous APIs. WindowsAzure.Storage
on NetStandard only has asynchronous APIs.
Microsoft.Azure.Storage
v9.4 包暂时返回使用 Microsoft.WindowsAzure.Storage
命名空间,以简化现有库的转换.p>
Microsoft.Azure.Storage
v9.4 package moves back to use Microsoft.WindowsAzure.Storage
namespace temporarily to ease the transition for existing libraries.
只需根据我们的要求做出选择.
Just make choices based on our requirement.
这篇关于Microsoft.Azure.Storage 和 WindowsAzure.Storage Nuget 包之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!