简体   繁体   English

System.IO.FileLoadException - 无法加载文件或程序集 Microsoft.WindowsAzure.Storage

[英]System.IO.FileLoadException - Could not load file or Assembly Microsoft.WindowsAzure.Storage

I have a web service that downloads a file from a Windows Azure Service Bus.我有一个 web 服务,它从 Windows Azure 服务总线下载文件。 However as soon as I call the method that connects to azure to download the file I get the following error.但是,一旦我调用连接到 azure 的方法来下载文件,我就会收到以下错误。

An exception of type 'System.IO.FileLoadException' occurred in MyWebService.dll but was not handled in user code MyWebService.dll 中出现类型为“System.IO.FileLoadException”的异常,但未在用户代码中处理

Additional information: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=3.1.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.其他信息:无法加载文件或程序集“Microsoft.WindowsAzure.Storage,Version=3.1.0.1,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference.找到的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040) (HRESULT 异常:0x80131040)

I have checked the versions of azure I am using and all are version 3.1.0.1.我检查了我使用的azure的版本,都是3.1.0.1版本。

在此处输入图像描述

I think the Problem in your case is Windows is blocking the DLL from being referenced . 我认为在你的情况下问题是Windows阻止DLL被引用。 You need to first " Unblock " it first and then add Refernce .. 你需要首先“取消阻止 ”它然后添加参与..

Refer this link : Could not load assembly, Exception from HRESULT: 0x80131040 请参阅此链接: 无法加载程序集,HRESULT异常:0x80131040

Right click on the DLL in file explorer to open the properties dialog.右键单击文件资源管理器中的 DLL 以打开属性对话框。 On Windows 10 and 11 at the bottom of the general tab there is a checkbox you need to tick to enable use of your DLL.在常规选项卡底部的 Windows 10 和 11 上有一个复选框,您需要勾选才能启用您的 DLL。

在此处输入图像描述

暂无
暂无

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

相关问题 Package 还原失败 Microsoft.WindowsAzure.Storage - Package Restore Failed Microsoft.WindowsAzure.Storage System.IO.FileNotFoundException:无法加载文件或程序集 'Microsoft.EntityFrameworkCore,版本 = 2.2.0.0, - System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.2.0.0, 无法加载文件或程序集 'System.ComponentModel,版本 = 5.0.0.0 - Could not load file or assembly 'System.ComponentModel, Version=5.0.0.0 无法使用 Azure 函数加载文件或程序集 System.Fabric - Could not load file or assembly System.Fabric with Azure Functions 无法加载文件或程序集“Microsoft.IdentityModel.Clients.ActiveDirectory,版本 = 3.19.8.16603。 与程序集引用不匹配 - Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.8.16603. does not match the assembly reference Azure Runbook 错误:无法加载文件或程序集“Microsoft.SqlServer.BatchParser.dll” - Azure Runbook Error: Could not load file or assembly 'Microsoft.SqlServer.BatchParser.dll' Azure Function V3 无法加载文件或程序集 'Microsoft.Extensions.DependencyModel,版本 = 3.1.6.0 - Azure Function V3 Could not load file or assembly 'Microsoft.Extensions.DependencyModel, Version=3.1.6.0 System.BadImageFormatException:无法加载文件或程序集(来自 installutil.exe) - System.BadImageFormatException: Could not load file or assembly (from installutil.exe) Azure 函数错误 - 无法加载文件或程序集 System.Configuration.ConfigurationManager,版本 = 4.0.3.0 - Azure Functions Errro - Could not load file or assembly System.Configuration.ConfigurationManager, Version=4.0.3.0 Azure Function 使用 Graph 我得到“无法加载文件或程序集‘System.Text.Json’” - Azure Function Using Graph I get "Could not load file or assembly 'System.Text.Json"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM