I am using C # and VS2010. I have a dll that I reference in my project (as a dll link, not a project link). This dll (a.dll) refers to another dll that my project does not use directly, call it b.dll. None of them are in the GAC.
My project compiles fine, but when I run it from Visual Studio, I get an exception that cannot be found in b.dll. It is not copied to the bin directory when compiling my project.
What is the best way to get b.dll in the bin directory so that it can be found at runtime. I thought of four options.
- Use the post compile step to copy b.dll to the bin directory
- Add b.dll to my project (as a file) and specify a copy in the output directory, if new
- Add b.dll as a dll link for my project.
- Use ILMerge to combine b.dll with a.dll
I don't like 3 at all because it makes b.dll visible to my project, the other two are like hacks. Are there any other solutions? What is the βrightβ way? Can the dependency injection platform allow and load b.dll?
source share