Where should you put 3rd party .NET dlls when using git submodules to avoid duplication

Posted by Tim Abell on Stack Overflow See other posts from Stack Overflow or by Tim Abell
Published on 2010-05-21T13:33:50Z Indexed on 2010/05/21 13:41 UTC
Read the original article Hit count: 330

Filed under:
|

I have two .NET library projects in Visual Studio 2008 that both make use of the MySql Connector for .NET (MySql.Data.dll). These libraries are then in turn both used by a .NET command line application which also uses the Connector. The library projects are pulled in to the application's solution as git submodules and referenced by project in Visual Studio.

I'm looking for the most effective strategy for storing and referencing the MySql Connector library.

I have tried having the MySql.Data.dll checked in to all three projects (in their root folder), this was problematic when one project changed to a newer version of the connector dll. Although each project had its own version of the dll, only one was packaged into the resultant application leading to an API mismatch which was hard to pin down. This has put me off this approach.

I have tried having the command line application reference the connector dll that is held in a submodule, however this only removes the possibility of version mismatches when there is only one submodule rather than two as in this case.

I am contemplating putting the dll in the global assembly cache (GAC) of all machines that need to build or use the application, but I'm wary of not having all dependencies for an application available in source control.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about git