Microsoft Azure Storage SDK for .NET (9.3.0)
The Microsoft Azure Storage SDK for .NET allows you to build Azure applications that take advantage of scalable cloud computing resources.
This repository contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the Microsoft Azure .NET Developer Center.
- Create/Delete Tables
- Query/Create/Read/Update/Delete Entities
- Create/Read/Update/Delete Blobs
- Create/Update/Delete Directories
- Create/Read/Update/Delete Files
- Create/Delete Queues
- Insert/Peek Queue Messages
- Advanced Queue Operations
The complete Microsoft Azure SDK can be downloaded from the Microsoft Azure Downloads Page and ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more.
Please review Get started with Azure Storage if you are not familiar with Azure Storage.
For the best development experience, developers should use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes.
- .NET Framework 4.5: As of December 2016, Storage Client Libraries for .NET supports primarily the desktop .NET Framework 4.5.0 release and above.
- Windows 8 and 8.1 for Windows Store app development: Storage Client Libraries are available for Windows Store applications.
- Windows Phone 8 and 8.1 app development: Storage Client Libraries are available for Windows Phone applications including Universal applications.
- Netstandard1.3: Storage Client Libraries for .NET are available to support Netstandard application development including Xamarin/UWP applications.
- Netstandard1.0: Storage Client Libraries support PCL through a Netstandard Façade targeting netstandard1.0.
As the lowest TFM supported by all our implementations, 1.0 is selected to provide support for maximum platforms. The support is provided through a façade reference assembly targeting netstandard1.0. This assembly consists of a common set of APIs between Win8, Wp8 and Wpa with no API implementations. Through the bait and switch technique, the reference assembly enables other portable class libraries to reference Storage Client Library, while the correct implementation assembly will be picked when the package is referenced by the project.json file.
- Microsoft Azure Subscription: To call Microsoft Azure services, you need to first create an account. Sign up for a free trial or use your MSDN subscriber benefits.
- Hosting: To host your .NET code in Microsoft Azure, you additionally need to download the full Microsoft Azure SDK for .NET - which includes packaging, emulation, and deployment tools, or use Microsoft Azure Web Sites to deploy ASP.NET web applications.
- The Storage Client Library uses the semantic versioning scheme.
Use with the Azure Storage Emulator
- The Client Library uses a particular Storage Service version. In order to use the Storage Client Library with the Storage Emulator, a corresponding minimum version of the Azure Storage Emulator must be used. Older versions of the Storage Emulator do not have the necessary code to successfully respond to new requests.
- Currently, the minimum version of the Azure Storage Emulator needed for this library is 5.6. If you encounter a
VersionNotSupportedByEmulator(400 Bad Request) error, please update the Storage Emulator.
Download & Install
The Storage Client Library ships with the Microsoft Azure SDK for .NET and also on NuGet. You'll find the latest version and hotfixes on NuGet via the
This version of the Storage Client Library ships with the storage version 2018-03-28.
To get the source code of the SDK via git just type:
git clone git://github.com/Azure/azure-storage-net.git cd azure-storage-net
To get the binaries of this library as distributed by Microsoft, ready for use within your project you can also have them installed by the .NET package manager NuGet.
Please note that the minimum nuget client version requirement has been updated to 2.12 in order to support multiple netstandard targets in the nuget package.
The desktop and phone libraries depend on Newtonsoft Json, which can be downloaded directly or referenced by your code project through Nuget.
- [Newtonsoft.Json] (http://www.nuget.org/packages/Newtonsoft.Json)
WCF Data Services Client
The desktop library depends on WCF Data Services Client, which can be downloaded directly or referenced by your code project through Nuget.
- [Microsoft.Data.Services.Client] (http://www.nuget.org/packages/Microsoft.Data.Services.Client/)
The client-side encryption support depends on the KeyVault.Core package, which can be downloaded directly or referenced by your code project through Nuget.
- [KeyVault.Core] (http://www.nuget.org/packages/Microsoft.Azure.KeyVault.Core)
FiddlerCore is required by:
This dependency is not included and must be downloaded from http://www.telerik.com/fiddler/fiddlercore.
Tests for the client-side encryption support also depend on KeyVault.Extensions, which can be downloaded directly or referenced by your code project through Nuget.
- [KeyVault.Extensions] (http://www.nuget.org/packages/Microsoft.Azure.KeyVault.Extensions)
Note: How-Tos focused around accomplishing specific tasks are available on the Microsoft Azure .NET Developer Center.
Creating a Table
First, include the classes you need (in this case we'll include the Storage and Table and further demonstrate creating a table):
using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Table;
To perform an operation on any Microsoft Azure resource you will first instantiate a client which allows performing actions on it. The resource is known as an entity. To do so for Table you also have to authenticate your request:
var storageAccount = CloudStorageAccount.Parse(storageConnectionString); var tableClient = storageAccount.CreateCloudTableClient();
Now, to create a table entity using the client:
CloudTable peopleTable = tableClient.GetTableReference("people"); peopleTable.Create();
Be sure to check out the Microsoft Azure Developer Forums on MSDN if you have trouble with the provided code or use StackOverflow.
Collaborate & Contribute
We gladly accept community contributions.
- Issues: Please report bugs using the Issues section of GitHub
- Forums: Interact with the development teams on StackOverflow or the Microsoft Azure Forums
- Source Code Contributions: Please see CONTRIBUTING.md for instructions on how to contribute code.
For general suggestions about Microsoft Azure please use our UserVoice forum.