I have a class library project that i have made. Let's call it ClassA. In ClassA i need to access some tools that reside in dll (ToolsDLL.dll).
In ClassA I have added ToolsDLL.dll to the project and selected the ToolsDLL.dll file to Copy To Output directory ALWAYS. So that library builds and compiles just fine and in the output directory i see ClassA.dll along with ToolsDLL.dll
Next, I want to write an application, say App_A that uses the methods in ClassA. So, in my App_A project, I added a reference to ClassA.dll so that I can access it's namespace. All is well and good, it build/compiles.
The problem is as soon as I run App_A and it gets to a point where ToolsDLL.dll needs to be used it throws an exception "Unable to Load ToolsDLL.dll. I don't understand how it is possible that it can't find that dll because it is in the same directory as ClassA.dll.
I found that if i put ToolsDLL.dll in the output directory of App_A it works just fine. Is there any way around that? Is there any way that ToolsDll.dll can be somehow bundled with ClassA.dll. The reason is that my customers will be writing their own applications similar to AppA and it would be nice if they only had to reference one file in their project and not multiple.