c# - Release模式下的 Visual Studio "Could not load file or assembly. Operation is not supported"错误

标签 c# visual-studio-2010

我有一个使用两个外部 dll 文件的 C# 小项目。一个是Redmine.Net.Api.dll,另一个是NLog.dll。我正在使用 Visual Studio 2010。我将这两个文件添加为对我的项目的引用。问题是,当我在 Debug 模式下运行项目时,它会编译,但是当我切换到 Release 模式时,它会说:

Error 1 Could not load file or assembly 'file:///C:\project\lib\Redmine.Net.Api.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) C:\project\SGEN project

我该如何解决这个问题?

最佳答案

您是否从网上下载了 Redmine.Net.Api dll?如果是,则使用 Windows 资源管理器浏览到它,右键单击它并选择属性。在那里你应该点击“取消阻止”。由于某些原因,它可能已被阻止。

enter image description here

关于c# - Release模式下的 Visual Studio "Could not load file or assembly. Operation is not supported"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21753979/

相关文章:

c# - 从字面上打印带有前导 0 的整数

c# - Azure 语音转文本模型运行但返回错误的输出

c# - 检查c#中sql命令的返回

c# - 升级到WebApi.Core报错-直接路由不能使用参数 'controller'

c# - 在可为空的可选参数中使用 C# 7.1 默认文字会导致意外行为

.net - 我可以在面向 .NET 3.5 SP1 的同时使用 .NET 4 功能吗?

string - 字符串包含 'AA' 时的 IndexOf 错误

visual-studio-2010 - 远程调试 : Target computer cannot connect back to this computer. 认证失败

visual-studio - Visual Studio 2010 Ultimate 中缺少源代码管理插件

c# - 从 C# 控制台应用程序杀死 Java 进程