无法解决此参考错误 [英] Could not resolve this reference error

查看:23
本文介绍了无法解决此参考错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have been writing a program and within the program I had to zip some files, so I used a addon called Ionic.Zip.

当我运行我的程序时,它完全没有错误,但是现在当我在编写完程序后尝试构建我的程序时,我收到以下错误.

When I run my program its perfectly fine with no errors, but now when I try to build my program as i have finished writing it I get the following error.

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.

有什么想法会导致这种情况吗?

Any ideas what would cause this?

推荐答案

您正在引用 bin\Debug 文件夹中的 Ionic.zip.你不应该那样做.bin\Debug 是不稳定的,它的内容随时可能被删除.相反,在您的项目文件夹中放置一个 DLL 并从那里引用.这样,您将使用项目文件夹中的引用进行构建,但正在执行的应用程序将为自己创建一个副本,因为复制本地设置为 True.

You are referencing Ionic.zip from the bin\Debug folder. You shouldn't do that. bin\Debug is volatile and its contents may get deleted any time. Instead, place a DLL inside your project's folder and reference from there. This way you will be building using a reference from your project's folder, but the executing application will make a copy for itself, since copy local is set to True.

这篇关于无法解决此参考错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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