• <1 minute

Recent Updates to the Windows Azure SDK – .NET 4.5, Windows Server 2012 and more

Editor's Note: This post is written by Mohit Srivastava and Dennis Angeline.   The latest release of the Windows Azure SDK for .NET contains a number of great improvements. New…

Editor’s Note: This post is written by Mohit Srivastava and Dennis Angeline.  

The latest release of the Windows Azure SDK for .NET contains a number of great improvements. New features include:

  • .NET 4.5 / Windows Server 2012 (OS Family 3) support in Web/Worker Role
  • VS tools – Productivity improvements
  • Cache for Web/Worker Role – General availability
  • Storage – New tooling and client library
  • Service Bus – Updated client library and tooling

In addition, Windows Azure PowerShell (separate download) now includes support for Service Bus namespaces, as well as uploading VHD’s. All of these SDK and PowerShell enhancements are shipped and available on the Windows Azure .NET Developer Center. Below are more details on them: 

.NET 4.5 / Windows Server 2012 (OS Family 3) support in Web/Worker Role

With this release of the SDK, you can now run your Cloud Service applications in Windows Server 2012. When you choose Windows Server 2012, you also get the new features in IIS 8 and .NET 4.5. IIS 8 includes WebSockets to help you build modern real-time applications — such as games and chat applications — that can run in browsers and phones. .NET 4.5 introduces a major revision to ASP.NET with much richer asynchronous capabilities, WebSockets support, and performance enhancing reductions (up to 35%) in both startup time and memory footprint.

To start using these features in Visual Studio, first create a .NET 4.5 Windows Azure Cloud Service:

Your application is automatically configured to target OS Family 3, or Windows Server 2012.

If you have an existing OS Family 1 (Windows Server 2008 SP2) or OS Family 2 (Windows Server 2008 R2) project, you can retarget it to OS Family 3 and start taking advantage of Windows Server 2012. After installing the October 2012 SDK, upgrade your project to target the latest SDK (details in the next section). Then, change the OS Family attribute in the Service Configuration to “3”, as shown above.

VS tools – Productivity improvements

The October SDK can be installed side-by-side with the November 2011 and June 2012 releases of the SDK. This lets you install the new SDK and start experimenting with the new features in new projects, but only upgrade existing projects when you are ready.

When you are ready, upgrade your project by right-clicking the Windows Azure Cloud Service Project, selecting Properties, and choosing Upgrade from the Application tab:

Alternatively, for machines with only the October SDK installed, you can upgrade your project during File->Open when prompted by Visual Studio:

You will know that you successfully upgraded your Cloud Service project the project properties will show the Windows Azure Tools version of October 2012.

Once you have converted your project, you can additionally target OS Family 3 (as described in the previous section) and .NET 4.5.

Additional tools improvements include:

  • Support for up to 25 management certificates per subscription
  • Less context switching to portal – You can now retrieve connection strings and use tooling for Storage and Service Bus simply by importing your subscription information from the portal
  • Improved tooling for Cache and Server Explorer for Storage and Service Bus (detailed in the next sections)

Cache for Web/Worker Role – General Availability

Windows Azure Caching enters General Availability as part of the October SDK. Caching provides a way to use the memory that is on your role instances as a cache cluster. When using high availability mode, secondary copies are also placed across different fault domains and upgrade domains. If one of the virtual machines in the cache cluster goes down for any reason, the cache cluster can use the secondary copies to prevent data loss.

Features include:

  • Pre-built ASP.NET providers for session state and page output caching, enabling acceleration of web applications without having to modify application code.
  • Caches for any serializable managed object – for example: CLR objects, rows, XML, binary data.
  • Memcached compatibility

You can enable and configure a Windows Azure in-memory distributed cache cluster for a Cloud Service role from the role’s properties page. For full details, see How to Use Windows Azure Caching.

Storage – New tooling and client library

The Visual Studio Server Explorer has been enhanced with better support for viewing and managing Windows Azure Storage Blobs and Queues. The Add New Storage Account dialog can now enumerate the storage accounts in your subscription eliminating the need to copy storage connections string from the portal.

The Blobs node supports upload, download, query add delete operations on Blobs.

The Queues node supports as add message, dequeue message and clear queue operations on Queues.

In addition, version 2.0 of the Windows Azure Storage Client Library is available via NuGet. This includes new features such as a simplified interface for Table, richer debugging, Blob download resume and asynchronous cross-account Copy Blob. For full details, see Introducing Windows Azure Storage Client Library 2.0 for .NET and Windows Runtime.

Because the library contains breaking changes and Windows Azure Diagnostics currently depends on Storage Client 1.7, Cloud Services projects in Visual Studio continue to use Storage Client 1.7. However, because the assembly name has changed, you can add Storage Client 2.0 side-by-side using Add Reference (using NuGet will replace the assembly). For a list of the changes and migration tips, see Windows Azure Storage Client Library 2.0 Breaking Changes & Migration Guide.

Service Bus – Updated client library and tooling

The Service Bus client library has been updated to 1.8 with new features that make it easier to build applications with rich messaging flows. You can now connect Queues and Topics using auto-forwarding. This enables you to scale out Topics, or to fan-in messages from multiple Queues into a single Queue. Additionally new methods for updating entities, querying entities and renewing message locks are now available. For full details, see Release Notes for the Service Bus October 2012 release.

As with Storage, you can now use Service Bus tooling with your imported subscription settings and import namespaces without additional trips to the portal:

Once you’ve chosen a namespace, you can create, delete, and send test messages to Queues and Topics. New in this SDK release, you can also update existing Queues and Topics to test the impact of settings changes on your application’s behavior:

Summary

All the above enhancements are shipped and available to use immediately as part of the October release of the Windows Azure SDK for .NET. If you don’t already have a Windows Azure account, you can sign-up for a free trial and start building .NET applications for Windows Azure today. Visit the Windows Azure .NET Developer Center to learn more.

In an upcoming post, we will discuss recent Windows Azure PowerShell improvements. Keep an eye out on this blog for details.

Hope this helps,

Windows Azure SDK Team