Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I distribute log4net with my releases?

I am wondering what is best practice when it comes to dependencies and how releases should be done. In my case I have a library that relies on log4net and I am wondering if I should distribute log4net.dll (set the log4net reference to copy local) along with the release?

Could I simply state that log4net should be installed in the GAC?

like image 342
Fadeproof Avatar asked Dec 18 '22 10:12

Fadeproof


2 Answers

Relying on libraries in the GAC can cause version conflicts and other problems that are very hard to troubleshoot and debug. I always try to distribute everything with my software.

like image 130
Mendelt Avatar answered Jan 04 '23 15:01

Mendelt


I'm not a big fan of putting log4net (or NUnit) in the GAC. I prefer keeping 3rd party libraries local - it makes it clearer what the dependencies are and what version you're using. It also means that anyone wanting to get started with your project can just download, extract, and build.

So yes, I suggest you distribute log4net.dll, along with its licence agreement.

Have a look at the lib directory for my ProtoBuf port for example.

like image 41
Jon Skeet Avatar answered Jan 04 '23 15:01

Jon Skeet