Tuesday, 30 November 2010

Using Windows Azure MMC and Cmdlet with Windows Azure SDK 1.3

If you haven't already read on the official blog, Windows Azure SDK 1.3 was released (along with Visual Studio tooling).  Rather than rehash what it contains, go read that blog post if you want to know what is included (and there are lots of great features).  Even better, goto microsoftpdc.com and watch the videos on the specific features.

If you are a user of the Windows Azure MMC or the Windows Azure Service Management Cmdlets, you might notice that stuff gets broken on new installs.  The underlying issue is that the MMC snapin was written against the 1.0 version of the Storage Client.  With the 1.3 SDK, the Storage Client is now at 1.1.  So, this means you can fix this two ways:

  1. Copy an older 1.2 SDK version of the Storage Client into the MMC's "release" directory.  Of course, you need to either have the .dll handy or go find it.  If you have the MMC installed prior to SDK 1.3, you probably already have it in the release directory and you are good to go.
  2. Use Assembly Redirection to allow the MMC or Powershell to call into the 1.1 client instead of the 1.0 client.

To use Assembly Redirection, just create a "mmc.exe.config" file for MMC (or "Powershell.exe.config" for cmdlets) and place it in the %windir%\system32 directory.  Inside the .config file, just use the following xml:

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
         <assemblyIdentity name="Microsoft.WindowsAzure.StorageClient"
                           publicKeyToken="31bf3856ad364e35"
                           culture="neutral" />
         <bindingRedirect oldVersion="1.0.0.0"
                          newVersion="1.1.0.0"/>
       </dependentAssembly>
       <dependentAssembly>
         <assemblyIdentity name="Microsoft.WindowsAzure.StorageClient"
                           publicKeyToken="31bf3856ad364e35"
                           culture="neutral" />
          <publisherPolicy apply="no" />
       </dependentAssembly>
 
      </assemblyBinding>
   </runtime>
</configuration>
Thursday, 02 December 2010 17:59:07 (Eastern Standard Time, UTC-05:00)
Zoinks! I already installed v1.3 of the SDK so my 1.2 version of the DLL is gone. I'd really like to take the first approach (I'm a little uncomfortable overriding all of MMC). Any chance you could somehow make the correct DLL available, maybe in your blob storage? :-)

By the way, your MMC snapin is mighty fine. Thank you.
CuriousGeorge
Saturday, 11 December 2010 12:08:41 (Eastern Standard Time, UTC-05:00)
Any chance of the cmdlets and mmc being rolled into the official Azure SDK?
dk
Sunday, 19 December 2010 18:45:21 (Eastern Standard Time, UTC-05:00)
Thanks for this fix. FYI, your missing a closing '/' at the end of the publisherPolicy node...
Pierre
Comments are closed.