Visual Studio“无法加载文件或程序集.不支持操作"发布模式错误 [英] Visual Studio "Could not load file or assembly. Operation is not supported" error in Release mode

查看:30
本文介绍了Visual Studio“无法加载文件或程序集.不支持操作"发布模式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a small project in C# that uses two external dll files. One is the Redmine.Net.Api.dll and the other is NLog.dll. I'm using Visual Studio 2010. I added both files as Reference to my project. The problem is that when I run the project in Debug mode, it compiles, but when I switch to Release, it says:

错误 1 ​​无法加载文件或程序集'file:///C:projectlibRedmine.Net.Api.dll' 或其中之一依赖关系.不支持操作.(HRESULT 的例外:0x80131515) C:projectSGEN 项目

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

我该如何解决这个问题?

How can I fix this?

推荐答案

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

Did you download Redmine.Net.Api dll from the web? If yes, then browse to it with Windows Explorer, right click on it and choose properties. There you should click 'Unblock'. It might have been blocked for some reasons.

这篇关于Visual Studio“无法加载文件或程序集.不支持操作"发布模式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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