Windows Azure MMC与Windows Azure SDK 1.3版本的兼容问题

根据http://archive.msdn.microsoft.com/windowsazuremmc的描述,我下载了Windows Azure MMC工具,用以对Windows Azure和Dev Fabric中的Hosted Service、Storage等进行简单维护。该工具解压后,会产生一个starthere.cmd文件进行安装,并且产生一个release文件夹,里面包含了windowsazuremmc.msc,双击该文件可以启动。

 

我的机器安装了Windows 2008 R2, Visual Studio 2010, Windows Azure SDK 1.3,Windows Azure Tools 1.3 for VS 2010。但运行starthere.cmd到最后步骤,出现错误,之后运行windowsazuremmc.msc会报下列错误:

 

 

点击确定后会出现下列错误:

 

具体错误如下:

未能加载文件或程序集“Microsoft.Samples.WindowsAzureMmc.ServiceManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。

 

在网上搜索到相应的原因及解决方案( 参见:http://dunnry.com/blog/2010/11/30/UsingWindowsAzureMMCAndCmdletWithWindowsAzureSDK13.aspx )

WindowsAzureMMC与Windows Azure SDK 1.3中Microsoft.WindowsAzure.StorageClient.dll版本不兼容。MMC原本要求Windows Azure SDK 1.2中1.0版本的StorageClient.dll;而Windows Azure SDk 1.3中只提供1.1版本的StorageClient.dll。

我采用的解决办法是:

在windows/system32目录下建立一个mmc.exe.config文件,对该dll进行调用重定向。在文件中填入下列内容:

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

 

然后来就OK了:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值