Setup for Development on the Media Services SDK for .NET
Updated: February 13, 2014
This topic is a developer task in the series Building Applications with the Media Services SDK for .NET. The setup tasks in this topic are required 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.5 or .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 2012 or Visual Studio 2010 SP1. 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.
Alternatively, you can get the latest Media Services SDK bits from GitHub, build the solution, and add the references to the client project. Note that all the necessary dependencies get downloaded and extracted automatically. In either method, you do not need to download dependencies manually.
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.
Also, check out the WindowsAzure.MediaServices.Extensions. See the following quickstart: Using the Media Services .NET SDK Extensions.
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; using Microsoft.WindowsAzure.StorageClient; using Microsoft.WindowsAzure.MediaServices.Client;
Using the Media Services .NET SDK Extensions
There is also the Media Services .NET SDK Extensions available to you. The Media Services .NET SDK Extensions is a set of extension methods and helper functions that will simplify your code and make it easier to develop with Media Services. For more information, see Quickstart: Using the Media Services .NET SDK Extensions.