What is the difference between the Microsoft.Azure.Storage and WindowsAzure.Storage Nuget packages?

vargonian picture vargonian · Nov 8, 2018 · Viewed 12.5k times · Source

I've always found this very confusing. 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. 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?

Answer

Jerry Liu picture Jerry Liu · Nov 9, 2018

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.

Check the changelog of Storage .NET SDK. List part of those important differences/changes.

  1. Microsoft.Azure.Storage splits libraries to three parts, Blob, Queue and File, which means we can install separate package instead of the full edition.

  2. Microsoft.Azure.Storage doesn't support Table API, it is transferred to Microsoft.Azure.Cosmos.Table.

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

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