Announcing the June 2012 Release of Windows Azure SDK for .NET – Now with Support for Visual Studio 2012 RC

I’m excited to announce the release of the Windows Azure SDK for .NET – June 2012, which is available for immediate download here. The SDK provides tools for both Visual Studio 2010 SP1 and Visual Studio 2012 RC. Visual Studio 2012 support for the Azure SDK has been a popular request and I’m happy to make this available today in coordination with the June 2012 release of Windows Azure. For more information on today’s platform release, I recommend visiting Scott Guthrie’s blog for the overall announcement, as well as the videos from today’s Meet Windows Azure event.

In Visual Studio, we focus on providing you with the best possible tools to develop your cloud services. There are two ways we go about doing this. One is the productivity tooling features for Windows Azure apps, which I’ll be covering in more detail in this post. The other is the application lifecycle management tools we provide, which help decrease cycle time and enable the team to deploy more quickly (see my previous post on continuous value delivery.) Today we announced new features for developing cloud based services, including continuous integration and continuous deployment. With these new features you can view your deployment history and have it integrated in a nice view:

Deployed Builds in TFS Portal

I encourage you to visit Brian Harry’s blog for a more in-depth walkthrough demonstrating what’s new.

Latest Platform and Tools

Building on from last week’s blog post announcing Visual Studio 2012 Release Candidate, you can now natively build Windows Azure Cloud Services and Windows Azure Web Sites in VS 2012 RC. This follows our principle of delivering tools on a cadence that aligns with the platform. You can also develop solutions that combine Windows Azure projects along with your favorite client projects. You will also have a host of OS options for your developer machine including Windows 7, Windows 2008, Windows 2008 R2, Windows 8 RP and Windows Server 8 RP.

1-mvc4-emulator-iisexpress

When you develop using Visual Studio 2012 RC you will notice a lighter weight install footprint of the Windows Azure SDK. On a 64bit machine the install package size is roughly 35mb. We were able to do this by enabling the Windows Azure SDK to work with the streamlined IIS Express and SQL 2012 LocalDB development servers that ship with VS2012RC (or chain in as a download for VS 2010 SP1). You will also notice that development with these services will work more seamlessly with little or no configuration and they can run as your signed-in user account. Currently admin-elevation is still a requirement in this release of the tools – this requirement is something we aim to eliminate in future versions. SQL Server Express and the full IIS Server continue to be supported options for local development as well.

In the past, in-place upgrades of the Azure SDKs and tools have been problematic. That’s why we made it a goal of the release to support side-by-side of the SDK starting with November 2011 and later SDKs. You can install SDKs for November 2011 and June 2012 on the same machine, and continue working using the appropriate SDK version for your project. Additionally cloud developers working in a team can use either Visual Studio 2010 SP1 or Visual Studio 2012 RC so long as the matching version(s) of the SDK are installed. These environments are compatible.

Projects

You will notice several updates across our projects. First the Windows Azure project has been renamed to Windows Azure Cloud Service, aligning with updated name of the compute container for our infinitely scalable, multi-tier services. You can also continue to add the Cloud Service to any existing web project using the “Add Windows Azure Cloud Service”. Web project front ends can also be natively published to the new Windows Azure Web Sites Preview compute container. For more information <see this post on WA Web Sites>.

As we create the Azure projects we now add the most common NuGet packages and binary references used in cloud development, namely runtime, diagnostics, storage and configuration. We add a NuGet package specifically for Windows Azure Storage and we add another package for the all new Windows Azure CloudConfigurationManager. CloudConfigurationManager makes it easy to read config settings using a smart algorithm that first checks your cloud configuration (.cscfg) and falls back to web.config/app.config if the config key or config system is not available. I’m excited about this new API because you can more easily access configuration in one line of code, and you will by default leverage a best practice that allows dev-ops to override the config settings in each target environment. NuGet is also a powerful mechanism for cloud developers because it allows you to search our servers for the most up-to-date versions of the Windows Azure client libraries and it also enables update notifications in the NuGet Package Manager.

2-CloudConfigurationManager

There are a few new project template options. As I mentioned earlier we support new web template types such as MVC4 and MVC4 Web API. There are also new templates for Worker Role with Service Bus Queue and Cache Worker Role, which optimize your role for these Windows Azure services. Service Bus developers should check out the new Queues and Topics features of the Service Bus node in Server Explorer.

For more advanced situations we added a mechanism to include your custom files and folder structure to be installed into the role along with your cloud service. This allows enhanced customization of what gets packaged and deployed to your roles / VMs. Simply right click on roles in your Azure project and Add -> Item.. or Add -> Folder.

Windows Azure Virtual Machines Preview (IAAS)

Windows Azure Virtual Machines Preview provides a powerful new compute container to run persistent VM workloads. Effectively you can bring your own VM and customize it with the OS and applications of your choice to run your workload. Using the cloud tools in Visual Studio’s Server Explorer you can discover important information about the Virtual Machines that you need at development time. E.g. you can easily explore the names and status of all your virtual machines, you can get the DNS name, and expand to see all the endpoints exposed on specific ports like SQL servers or RDP access. Speaking of RDP, Remote Desktop is a common tool used to configure and troubleshoot environment specific behavior in the cloud environment. Now you can right-click on any Virtual Machine, Web or Worker role in Server Explorer and “Connect using Remote Desktop” if RDP is enabled on the role - without leaving Visual Studio at all.

3-virtualmachine-serverexplorer-rdp

Windows Azure Caching Preview

Another cool addition in this release is the ability to stand up your own distributed cache service in your roles and ultimately speed up the performance of your cloud service. This cache service will aggregate all instances in your deployment to provide a highly available distributed cache.

Visual Studio makes it incredibly easy to stand up the caching service. Simply open your role in the designer and check a box in the Caching tab to “Enable Caching”. Set a custom cache size value using the slider and customize any other behaviors. An exciting possibility this opens up is to leverage the unused memory and compute power of your existing role instances that you’re already paying for. Alternatively you can use the Dedicated Cache Worker Role template to stand up a role that is fully utilized for caching scenarios.

4-enable-windows-azure-caching

Leveraging the cache in your clients is easy using the Windows Azure Caching Preview NuGet package. When you add that package it adds the initial boiler plate web.config/app.config required to use Windows Azure instead of the in-memory provider. All you need to do is set the identifier name in the config to match the name of the role containing the cache. Then you can use the Microsoft.ApplicationServer.Caching.* APIs, or with a bit more standard config you can use ASP.NET caching, OutputCache, or SessionCache. More details are covered in this caching how-to guide.

5-consume-cache-in-client

Publishing

Building on improvements to publishing from the Nov 2011 SDK discussed in this Windows Azure Blog post, we added a few options based on developer feedback. First, there is a new deployment option for simultaneous update of instances. This is useful to speed up publishing times for multi-instance deployments if high availability of the service isn’t important (e.g. in a staging environment). This feature walks the instances manually in parallel rather using the default update mechanism that performs updates in one-by-one according to your update domain. Next we decided to have safer defaults for errors – e.g. if an update deployment fails the tool will no longer automatically retry with a delete and new deployment (however this is still an option in Advanced Settings). Last, there has been feedback suggesting that the automatic configuration of connection strings for Diagnostics and Caching at package build and publish time is too opaque, and instead developers would like this configuration to be more explicit and transparent in your project. Therefore we now do explicit one-time string token replacement of the storage connection string. This token replacement writes directly into the .cscfg file in your project giving you complete control and visibility into the change. You also have option to disable this behavior or change the connection string to something else at any time. All of your preferences for publishing and cloud config settings for the target environment can be saved into one or more config files.

For business application developers using Visual Studio LightSwitch, you will see an improved experience for publishing LightSwitch applications to Windows Azure. This includes a consistent experience for streamlined configuration by downloading your publish settings file and performing both your new deployments and deployment updates. Providing SDK tools for LightSwitch aligns with Visual Studio LightSwitch being a core part of Visual Studio Professional and higher editions. For more information please visit the LightSwitch team blog.

Summary

As you can see this is a significant update to the tools you use to develop your cloud applications. We look forward to you getting the SDK and hearing your feedback. For further details check out all the developer resources on the Windows Azure .NET Developer center.

Enjoy!

 

Follow me at https://twitter.com/jlzander