views:

147

answers:

5

Hi, I'm building a .NET DLL Class Library which depends on other libraries such as log4net.dll - where should I put these DLLs when packaging up my DLL? Is there a way to automatically include them inside one super-DLL? Should I just ship all the DLLs in a single bin folder?

A: 

in your solution tree, have a folder called 'src' for all yoru source code and one called 'lib' for libraries such as log4net, your homemade dll library, and any other libraries.

splatto
+5  A: 

You need to check the EULA and other licenses attached to those other DLL's first. Some may restrict how their DLL libraries are redestributed. Assuming no issues with that, you can either compile them all together as one big DLL, or create an installer (or a simple zip file) that will install all the associated DLL's in their intended destination.

BBlake
+6  A: 

Just ship them all in a directory with your dll (assuming you're talking about a binary distribution - in a source distribution I'd have a "lib" directory containing your dependencies).

Don't forget to check whether or not you need to also supply licences, directions to get the source etc.

I wouldn't be tempted to try to merge your class library with the dependencies, personally.

Jon Skeet
I actually did what you said not to do in your last statement there. Made my project very messy and confusing looking with that extra source. So, I just un-merged them. :)
Zack
A: 

You should take a look at ILMerge. I linked a blog that shows an usage of ILMerge

Leveraging ILMerge to simplify deployment and your users experience

Michaël Larouche
A: 

Not sure how you are deploying your solution, but don't forget that in order to sign your class libraries you'll need to have your 3rd-party .dlls signed. This alone might require you to merge all your references.

JonnyD