Setup for Development on the Media Services SDK for .NET
Updated: August 13, 2014
This topic shows how to setup for developing Microsoft Azure Media Services applications with the Media Services SDK for .NET.
The following prerequisites are required for development based on the Microsoft Azure Media Services SDK.
A Media Services account in a new or existing Azure subscription. See the topic How to Create a Media Services Account.
Operating Systems: Windows 7, Windows 2008 R2, or Windows 8.
NET Framework 4.
Visual Studio 2010 SP1 (Professional, Premium, Ultimate, or Express) or newer.
Setting up a project
This section describes how to set up a Visual Studio project for Media Services development.
Create a new C# Console Application in Visual Studio. Enter the Name, Location, and Solution name, and then click OK.
Add references to Media Services and its dependent DLLs.
The Media Services SDK has dependency on multiple libraries (for example, Azure Storage SDK for .NET and WCF Data Services for OData). You can use windowsazure.mediaservices nuget to install and add the Media Services SDK to your project, in which case all the dependencies get installed and added to your project automatically.
To add required references using windowsazure.mediaservices NuGet package, do the following:
Ensure that you have the newest version of NuGet installed.
For more information and installation instructions, see NuGet.
In Solution Explorer, right-click the name of the project and choose Manage NuGet packages ….
The Manage NuGet Packages dialog box appears.
In the Online gallery, choose Azure Media Services .NET SDK, and then choose the Install button.
After installing the package, the project is modified and references to Media Services assemblies are added.
To promote a cleaner developer environment, consider enabling NuGet Package Restore. For more information, see NuGet Package Restore.
- Ensure that you have the newest version of NuGet installed.
Add the following using (Imports in Visual Basic) statements to reference the required namespaces for the Media Services SDK.
using System; using System.Linq; using System.Configuration; using System.IO; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Microsoft.WindowsAzure.MediaServices.Client;
Using the Media Services .NET SDK Extensions
You can also use the Media Services .NET SDK Extensions package. The package contains a set of extension methods that will simplify your code and make it easier to develop with Media Services. For more information, see WindowsAzure.MediaServices.Extensions and Quickstart: Using the Media Services .NET SDK Extensions.