I am working on a C# .NET project in Visual Studio 2010. I am integrating a hardware peripheral that has a DLL. I reference the DLL file in my project and the code compiles/builds without any errors. When I run my application I get a runtime error saying that it is looking for another DLL file. It appears that the DLL I reference in my project has 42 other DLLs that it depends on. When I place these 42 DLLs in the output directory (bin/debug) the application runs just fine.
My questions is this: what is the best way to manage these extra DLL files when Visual Studio doesn’t recognize them as dependent libraries?
If you mean to manage these files at compile-time you can add a post-build event to the project to copy all of the necessary files over to the output directory. Add flags to xcopy here to only copy over if changed.
If you mean at run-time an installer would be your best solution.