无法解决此引用错误

时间:2014-12-10 16:09:25

标签: vb.net visual-studio-2010

我一直在编写程序,在程序中我必须压缩一些文件,所以我使用了一个名为Ionic.Zip的插件。

当我运行我的程序时它完全正常没有错误,但现在当我尝试构建我的程序时,我已经完成了写入,我得到以下错误。

Code:
Warning 1   Could not resolve this reference. Could not locate the assembly "Ionic.Zip". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
and the same error for each form where I use the code to zip the files.

任何想法会导致什么?

enter image description here

1 个答案:

答案 0 :(得分:1)

您正在从bin \ Debug文件夹引用Ionic.zip。你不应该这样做。 bin \ Debug是volatile,其内容可能随时被删除。而是将DLL放在项目的文件夹中并从那里引用。这样,您将使用项目文件夹中的引用进行构建,但正在执行的应用程序将自行复制,因为copy local设置为True。