Export (0) Print
Expand All

Setup for Development with 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.

Prerequisites

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 2013, Visual Studio 2012, Visual Studio 2010 SP1 (Professional, Premium, Ultimate, or Express).

    Make sure to set the target framework to .NET Framework 4. To do this, click the right mouse button on the Visual Studio project and select Properties. In the Application tab, set .NET Framework 4 for the target framework. 

Setting up a project

This section describes how to set up a Visual Studio project for Media Services development.

  1. Create a new C# Console Application in Visual Studio. Enter the Name, Location, and Solution name, and then click OK.

  2. 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:

    1. Ensure that you have the newest version of NuGet installed.

      For more information and installation instructions, see NuGet.

    2. In Solution Explorer, right-click the name of the project and choose Manage NuGet packages ….

      The Manage NuGet Packages dialog box appears.

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

    4. To promote a cleaner developer environment, consider enabling NuGet Package Restore. For more information, see NuGet Package Restore.

    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.

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

See Also


Build Date:

2014-09-09

Community Additions

ADD
Show:
© 2014 Microsoft