Must have NuGet Packages for Windows Azure Development

If you’re a Microsoft .NET Developer and haven’t yet heard of NuGet, you are missing out. NuGet is a Package Management System which allows for simple import, setup and upgrading of Third Party Software Packages. The best thing about NuGet is it isn’t limited to Third Party Software as it is possible to Create Packages and Custom Lists which makes it perfect for sharing code within a Company.

image

How does NuGet fit into Windows Azure Development?

To be honest, you can definitely do your Windows Azure Development without NuGet. Where the real power of NuGet comes in is the Configuration and Upgrading.

NuGet out-of-the-box allows for Configuration and Source Code Transformations which simplifies the process of using Community Contributions or Open Source Packages from other Software Venders.

When taking a dependency on a Third Party Component many projects never update to the newer bits of the packages they use.  These updated bits could contain important security or service updates which are ignored mostly because it’s too hard to upgrade or fear of breaking changes to their product.

While NuGet doesn’t ultimately mitigate the risk of breaking changes, it does allow for a more controlled upgrade to packages as the manufacturer of the package is handling the update process.

Windows Azure Awesomesauce in NuGet

To get the ball rolling Install NuGet, and execute your first command from the Powershell based Package Manager Console.

Get-Package –Filter Azure –ListAvailable

Results for "Get-Package -Filter Azure -ListAvailable"

This Query of Packages in NuGet containing reference to Windows Azure returns 34 Packages which can be used in your upcoming Windows Azure Projects.

My Windows Azure NuGet Package Recommendations

To set the stage here, I have only used a few of these packages in projects, but some of them are definite no brainers when it comes to future projects I work on. Let’s dig in and sweet what has been made much easier for us! [Note: the Headers are the actually installation commands from the Package Management Console]

Install-Package System.Web.Providers

The ASP.NET Universal Providers package is currently in a beta release. These extensions are to provide consistent Provider Support for Membership, Users, Roles, Profile and Session support regardless of Deploying to an On-Premise Server or in the Cloud using Windows Azure.

You can think of System.Web.Providers as the next generation of the original Windows Azure Samples found in Microsoft.Samples.ServiceHosting.AspProviders. The benefit this package will hopefully bring is a fully supported implementation of Role and Membership Management in Windows Azure Table Storage.

[Follow: System.Web.Providers]

Install-Package WindowsAzure.ServiceBus

This is the June 2011 CTP of the Windows Azure AppFabric Service Bus Features.

This package will install and enable interaction with Windows Azure AppFabric Topics or Queues. I’m looking forward to start diving into Topics and Queues for my upcoming presentation at SDEC2011.

[Follow: WindowsAzure.ServiceBus]

Install-Package WindowsAzure.WebRole.MVC3

Since the RTW of ASP.NET MVC 3.0 many developers have been tweeting, and asking questions on the Forums about an MVC3 Supported WebRole in the Windows Azure Tools. This hasn’t been added to the tooling to date, but you now have the ability to create MVC3 enabled Web Roles for your Windows Azure Deployments.

This package takes care of the Copy Local=true issue that many people have run into during their first deployment.

[Follow: WindowsAzure.WebRole.MVC3]

Install-Package WindowsAzure.Caching

Need to use the Windows Azure AppFabric Caching layer for one of your Web Applications? Look no further from this NuGet Package which will download the required Assemblies as well as pre-fill the web.config file to get you well on your way to using Windows Azure AppFabric Caching.

[Follow: WindowsAzure.Caching]

Windows Azure CDN Helpers

This one breaks the mold as there are two different types of packages for this one. If you’re a Web Forms Developer or an MVC Developer you’re both covered, but using separate packages.

Install-Package CdnHelpers.Razor

Provides a Razor Syntax for the Windows Azure Content Delivery Network (CDN).

[Follow: CdnHelpers.Razor]

Install-Package CdnHelpers.ASPX

Provides an ASP.NET Web Forms approach to Windows Azure Content Delivery Network (CDN).

[Follow: CdnHelpers.ASPX]

Install-Package EnterpriseLibrary.WindowsAzure.TransientFaultHandling

One of the important things to remember when dealing with Cloud Development is the possibility of failure. This package is a great find for anyone working with SQL Azure, Windows Azure Storage, or Windows Azure AppFabric.

There are a number of great implementations of Failure Retry Logic as well as a number of Extension Methods which allows quick additions to pre-existing code that currently doesn’t implement transaction retry logic.

[Updated: December 10, 2011]

[Follow: EnterpriseLibrary.WindowsAzure.TransientFaultHandling]

Install-Package EnterpriseLibrary.WindowsAzure.Autoscaling

Many people have been asking “Why won’t Microsoft Auto-scale my instances”, simply put, they know they’ll get it wrong as the application you build is unique to your industry. So to help people that would like the ability to auto-scale instances in Windows Azure Microsoft has released the Enterprise Library Blocks for Windows Azure.

This package in particular provides reusable components to add or manage auto-scaling capabilities in your Windows Azure Applications.

[Added: December 10, 2011]

Install-Package smarx.WazStorageExtensions

Steve Marx from the Windows Azure Team has created a great package that extends the Windows Azure Storage Client Library with additional functionality which isn’t available in the Official SDK.

If you use Blobs, Tables or Queues [from Windows Azure Storage] in your Windows Azure Application including the new Storage Analytics functionality this is an absolutely must have!

[Added: December 10, 2011]

Install-Package BareWeb.FluentAzureDiagnostics.dll

Diagnostics are important in understanding the state of your application while deployed to Windows Azure. Setting up Diagnostics using the Windows Azure SDK can be verbose and difficult to understand.

This package will help simplify and make your diagnostics configuration code easier to read for any developer that might be picking up your Windows Azure Application.

[Added: December 10, 2011]

[Follow: BareWeb.FluentAzureDiagnostics.dll]

Install-Package WindowsAzure.ELMAH.Tables

As important as ensuring that your Diagnostics are set up to monitor how Windows Azure is performing, it’s always a good idea to ensure that you’re logging your application for potential Issues. ELMAH is a set of Error Logging Modules And Handlers [for ASP.NET] which allows for a very simple and pluggable application error handling.

Just as ELMAH is necessary for your on-premise or shared hosted web applications, it remains just as essential to ensure logging is carried into the Cloud.

[Added: August 18th, 2011]

[Follow: WindowsAzure.ELMAH.Tables]

Install-Package WindowsAzure.ACS.Management

The Windows Azure ACS Identity Provider SDK provides a .NET wrapper for home realm discover against the Windows Azure Access Control Service.

[Added: December 10, 2011]

[Follow: WindowsAzure.ACS.Management]

Wrapping Up

Thanks for reading this post! If you enjoyed the tips in this post you might be interested in my post on creating the Ultimate Windows Azure Development VM (or Environment).

Happy Clouding!

Leave a Reply