加载Microsoft.WindowsAzure.Storage异常创建新HiveConnection时 [英] Exception from loading Microsoft.WindowsAzure.Storage when creating a new HiveConnection

查看:292
本文介绍了加载Microsoft.WindowsAzure.Storage异常创建新HiveConnection时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个code工作:

I had this code working:

ClusterDetails details

return new HiveConnection(
      new Uri(details.ConnectionUrl),
      details.HttpUserName,
      details.HttpPassword,
      details.DefaultStorageAccount.Name,
      details.DefaultStorageAccount.Key);

但是当我通过的NuGet更新了的DLL,我开始此异常:

but when I updated the dlls through Nuget, I started getting this exception:

{无法加载文件或程序集Microsoft.WindowsAzure.Storage,版本= 2.0.0.0,文化=中性公钥= 31bf3856ad364e35'或一个依赖之一,位于集清单定义不匹配的程序集引用。 (异常来自HRESULT:0x80131040):Micr​​osoft.WindowsAzure.Storage,版本= 2.0.0.0,文化=中性公钥= 31bf3856ad364e35}

{"Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}

下面是我的packages.config:

Here is my packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Microsoft.Data.Edm" version="5.6.1" targetFramework="net45" />
  <package id="Microsoft.Data.OData" version="5.6.1" targetFramework="net45" />
  <package id="Microsoft.Data.Services.Client" version="5.6.1" targetFramework="net45" />
  <package id="Microsoft.Hadoop.Client" version="1.1.0.7" targetFramework="net45" />
  <package id="Microsoft.Hadoop.Hive" version="0.12.5126.42915" targetFramework="net45" />
  <package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.8.0.0" targetFramework="net45" />
  <package id="Microsoft.WindowsAzure.Management.HDInsight" version="1.1.0.7" targetFramework="net45" />
  <package id="Newtonsoft.Json" version="5.0.8" targetFramework="net45" />
  <package id="System.Spatial" version="5.6.1" targetFramework="net45" />
  <package id="WindowsAzure.Storage" version="3.0.3.0" targetFramework="net45" />
</packages>

我已经经历了和手工检查所有bin目录中的dll文件,以确保该版本匹配。我也检查,以确保它们都匹配的NuGet的最新版本。

I've gone through and manually checked all of the dlls in the bin directory to make sure that the versions match. I've also checked to make sure that they all match the latest versions on Nuget.

我试着加入这个变化:

<dependentAssembly>
  <assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-3.0.3.0" newVersion="3.0.3.0" />
</dependentAssembly>

要在app.config,但它只是会在code的不同部分的新异常。

to the app.config, but it just creates a new exception in a different part of the code.

IHDInsightClient _client;
var details = await _client.CreateClusterAsync(clusterInfo);

这code失败,出现以下异常:

This code fails with the following exception:

{值不能为空\\ r \\ n参数名:提供商}

{"Value cannot be null.\r\nParameter name: provider"}

这会发生,无论我告诉它使用的DLL的版本。我有这个外面安装SDK V2.2的。我卸载它,但是这并没有帮助。

This happens regardless of which version of the dll I tell it to use. I had v2.2 of the SDK installed outside of this. I uninstalled it, but that did not help.

在这一点上,我的想法和因为它的最后期限落后。有没有人遇到此之前?没有任何人有任何想法如何解决它?

At this point, I'm out of ideas and falling behind on a deadline because of it. Has anyone run into this before? Does anyone have any ideas on how to fix it?

推荐答案

存储库的3.1.0.1版本发布昨日(我一直在处理这个问题,因为星期日)。更新到固定的问题。

Version 3.1.0.1 of the storage library was released yesterday (I've been dealing with this issue since Sunday). Updating to that fixed the issue.

这篇关于加载Microsoft.WindowsAzure.Storage异常创建新HiveConnection时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆