JackSparrow
JackSparrow

Reputation: 389

Could not resolve this reference error

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?

enter image description here

Upvotes: 2

Views: 4171

Answers (1)

Victor Zakharov
Victor Zakharov

Reputation: 26454

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.

Upvotes: 1

Related Questions