简体   繁体   English

在创建新的HiveConnection时加载Microsoft.WindowsAzure.Storage的例外情况

[英]Exception from loading Microsoft.WindowsAzure.Storage when creating a new HiveConnection

I had this code working: 我有这个代码工作:

ClusterDetails details

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

but when I updated the dlls through Nuget, I started getting this exception: 但是当我通过Nuget更新dll时,我开始得到这个异常:

{"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"} {“无法加载文件或程序集'Microsoft.WindowsAzure.Storage,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。(例外情况HRESULT:0x80131040)“:”Microsoft.WindowsAzure.Storage,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35“}

Here is my packages.config: 这是我的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>

I've gone through and manually checked all of the dlls in the bin directory to make sure that the versions match. 我已经完成并手动检查了bin目录中的所有dll,以确保版本匹配。 I've also checked to make sure that they all match the latest versions on Nuget. 我还检查过以确保它们都符合Nuget的最新版本。

I've tried adding variations this: 我尝试过添加变体:

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

to the app.config, but it just creates a new exception in a different part of the code. 到app.config,但它只是在代码的不同部分创建一个新的异常。

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

This code fails with the following exception: 此代码失败,但出现以下异常:

{"Value cannot be null.\\r\\nParameter name: provider"} {“值不能为空。\\ r \\ nParameter name:provider”}

This happens regardless of which version of the dll I tell it to use. 无论我告诉它使用哪个版本的dll,都会发生这种情况。 I had v2.2 of the SDK installed outside of this. 我在这之外安装了SDK的v2.2。 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? 有没有人对如何解决它有任何想法?

Version 3.1.0.1 of the storage library was released yesterday (I've been dealing with this issue since Sunday). 昨天发布了存储库的3.1.0.1版本(我从周日开始就处理这个问题)。 Updating to that fixed the issue. 更新到那个修复了问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当包含“ Microsoft.WindowsAzure.Storage”时,C#的Powershell代码不起作用 - Powershell code from C# doesn't work when “Microsoft.WindowsAzure.Storage” is included OperationContext 使用情况 (Microsoft.WindowsAzure.Storage) - OperationContext usage (Microsoft.WindowsAzure.Storage) Azure function,缺少 Microsoft.WindowsAzure.Storage - Azure function, Microsoft.WindowsAzure.Storage missing HRESULT:0x80131040-找不到Microsoft.WindowsAzure.Storage - HRESULT: 0x80131040 - Microsoft.WindowsAzure.Storage not found Microsoft.WindowsAzure.Storage和System.Net.Http发生冲突 - Microsoft.WindowsAzure.Storage and System.Net.Http conflict Microsoft.WindowsAzure.Storage 是否符合 FIPS 140-2 - Can Microsoft.WindowsAzure.Storage be FIPS 140-2 compliant 无法加载文件或程序集“ Microsoft.WindowsAzure.Storage” Azure函数 - Could not load file or assembly 'Microsoft.WindowsAzure.Storage' Azure Functions 无法加载文件或程序集“Microsoft.WindowsAzure.Storage”或其依赖项之一。 运行聊天机器人 C# 时 - Could not load file or assembly 'Microsoft.WindowsAzure.Storage' or one of its dependencies. When running chat bot C# 如何用 Microsoft.Azure.Storage.Blob 替换 Microsoft.WindowsAzure.Storage - How to replace Microsoft.WindowsAzure.Storage with Microsoft.Azure.Storage.Blob Microsoft.Azure.Cosmos.Table 和 Microsoft.WindowsAzure.Storage 之间的 ExecuteQuerySegmentedAsync 性能显着下降 - Significant performance degration on ExecuteQuerySegmentedAsync between Microsoft.Azure.Cosmos.Table and Microsoft.WindowsAzure.Storage
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM