What is the best way to manage a DLL that you are not referencing in Visual Studio

I am working on a C # .NET project in Visual Studio 2010. I am integrating a hardware peripheral that has a DLL. I refer to a dll file in my project and the code compiles / builds without any errors. When I run my application, I get a runtime error stating that I am looking for another DLL file. It looks like the DLL link I in my project contains 42 other DLLs that it depends on. When I put these 42 DLLs in the output directory (bin / debug), the application works fine.

My questions are: what is the best way to manage these additional DLL files when Visual Studio does not recognize them as dependent libraries?

+5
source share
4

, post-build , . xcopy , .

, .

+2

SQL Server Compact. Private File–Based Deployment.
() DLL , .

DLL Copy to Output Directory Copy if newer. .

EDIT:
, , ( ), Custom Action , 42 DLL .
CA, . → → . Application Folder Add File 42 DLL.

+6

Or you can combine them using something like ILMerge to combine assemblies. And you just add a link to the resulting assembly.

How to combine several assemblies into one?

+1
source

You should work on creating the installer package, almost all installers will use all the dependencies of the referenced DLL if the project outputs are configured as necessary for the installer. This is the only way I can dynamically link your independent links without links.

0
source

All Articles