Reputation: 2614
I am trying to grab the .exe for sharing my C# console application from "obj\x86\Debug", where I find a myProgram.exe file.
When I call this from the command line, I get the following error:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly
'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73' or one of its dependencies.
The system cannot find the file specified.
at Project.MyClass..ctor(String arg1, String arg2)
at Project.MyClass.Main(String[] args) in C:\Project\MyClass\MyClass.cs:line 207
The program uses a DLL, which I have placed in a "\lib\" folder that I made in the root directory of the project; this is the ICSharpCode.SharpZipLib taht is being referred to.
Upvotes: 0
Views: 2409
Reputation: 10246
Your code failed to find the refrence ICSharpCode.SharpZipLib
.For this you can ,
Copy Local
property of your refrence to TrueThis should get your work done
Upvotes: 0
Reputation: 22368
You will need to copy that reference along with the .exe, simply placing it in the same directory, .net will find it for you when executing the program.
You can also make sure the referenced DLL is copied to the output directory (where the .exe is placed) by setting Copy Local to true in the properties window of the reference.
Upvotes: 3