无法加载文件或程序集 'LogicNP.ShellObjects'

Could not load file or assembly 'LogicNP.ShellObjects'

我需要一些有关 VB.net 代码的帮助。我对 VB.net 很陌生。我收到此错误:

Error 'Could not load file or assembly 'LogicNP.ShellObjects, Version=13.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'

这使我无法构建代码。看来我缺少某种文件,但我还没有听说过 LogicNP.ShellObjects。有什么地方可以找到这个文件吗?

编辑: 对于那些想知道的人,我确实在 project/solution 中有 .dll 文件。我将 dll 文件添加到解决方案资源管理器中,我可以在那里看到它。我还将dll文件添加到工具箱中。

我仍然收到同样的错误

编辑:

我想我可能已经找到了答案。我看过这个 posting:

Visual Studio "Could not load file or assembly. Operation is not supported" error in Release mode

错误确实消失了,但现在我有 4 个错误。我会更新这个 post if/when 我得到了要构建的项目。

ShellObjects 是 LogicNP 软件的控件和组件库,可在此处找到:

http://www.ssware.com/shlobj/shlobj.htm

库以一种叫做 Assembly 的形式提供,这是 .NET 的打包格式:

https://msdn.microsoft.com/en-us/library/ms973231.aspx

该错误消息表示您的代码包含对该程序集的引用,但Visual Studio无法在指定位置找到它。

好的,所以我已验证该修复程序确实有效。

发生的事情是计算机阻止加载 dll 文件,因为它是从 Internet 下载的。查看此贴:

Visual Studio "Could not load file or assembly. Operation is not supported" error in Release mode