Dll hell?

Topics: Writing modules
Mar 15, 2012 at 4:50 PM

To try prevent a 'dll hell' I figured I would create a module that contains the dll files so that other modules could reference it without having to include them in the package.

But it seems this isn't possible, as in 'package create' always includes the referenced libs :/

How would I go in properly preventing 'dll hell' for my modules? Should I 'hax' the nuget package to exclude the bins?

Developer
Mar 15, 2012 at 8:34 PM

This is what I've done with the Facebook SDK module. It is true that the package generation command will include the dlls in the package anyway, but you can safely delete them from the npkg if it's safe to assume that the user will install the dll package first. If Orchard gets automatic dependency downloading, that all will be much more fun.

Mar 21, 2012 at 9:05 AM
Edited Mar 21, 2012 at 9:22 AM
Piedone wrote:

This is what I've done with the Facebook SDK module. It is true that the package generation command will include the dlls in the package anyway, but you can safely delete them from the npkg if it's safe to assume that the user will install the dll package first. If Orchard gets automatic dependency downloading, that all will be much more fun.

Of my 'dll only' module, do I need to put the dll files in its 'bin' folder or in a subfolder and do I need to reference the dlls from within the module?

edit: Correct to say that I need to put them in the 'bin' folder? (As so did you in your Facebook SDK module)

Developer
Mar 21, 2012 at 10:08 AM

Somewhere I've read something about why it is better to place binaries into the bin folder in Orchard, but I can't recall. Nevertheless, in another module of mine I placed the into a Libs folder (or into a subfolder of bin), without problems...

Mar 21, 2012 at 10:36 AM
Piedone wrote:

Somewhere I've read something about why it is better to place binaries into the bin folder in Orchard, but I can't recall. Nevertheless, in another module of mine I placed the into a Libs folder (or into a subfolder of bin), without problems...

Well I think I got it to work : published AIM.DotNetZip (with the reduced ionic zip dll) and AIM.SharpKml (see http://sharpkml.codeplex.com/) and all seems in order.