Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What is the best practice for managing references in a .NET open source project? I'm writing a small library that will use Json.NET. Should I check the Json.NET DLL straight into source control?

share|improve this question
add comment

3 Answers

Yes you should - either that or reference the original project's version control directly (ie use SVN's externals feature to grab the relevant revision from the source repo, or have a link to get the right version of the project's source).

Put the dll in a slightly separate part of your repo though - do not bundle it in your /bin/release directory, you'll find it much easier to work with 3rd party dlls if there is a clear distinction between what is your code and what is theirs - especially when you come to replace or modify it.

share|improve this answer
    
Most of the open source projects I've looked at have both a /src and a /lib or /contrib in the root. References obviously go in the latter. –  Aaronaught Sep 7 '11 at 23:23
add comment

heres what I do: I create a solution folder for my 3rd party assemblies, I then add them to the source control and check them in. this way, they are distributed with my project. Of course, this is all subject to the distribution licenses of the various 3rd party assemblies.

I hate it when I dl an Open Source project and then I have to go and hunt down assemblies--especially when those assemblies may no longer be available.

share|improve this answer
add comment

If the licensing allows for including the binaries in your source control and distributing them, it makes alot of sense to include them for a few reasons. First and foremost is ease of development on you -- you don't need to go track down a dependency every time you want to hack on a different machine. Second is ease of development on folks also hacking on your library -- they won't have to go through the same gymnastics. Finally and perhaps more important, it makes sure you've got the correct version of the library traveling with your code.

In the case of JSON.NET, I believe it is MIT licensed which means you can definitely do it from a legal perspective. Add away. Preferably via nuget so I don't have to download it twice if I don't need it.

share|improve this answer
    
+1 for NuGet. NuGet helps a ton with managing dependencies amongst open source projects. For example, if someone wants to use your library which uses Json.NET and another library which also uses Json.NET, NuGet will resolve versioning issues and make sure that references for both libraries are correctly resolved. –  RationalGeek Sep 8 '11 at 11:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.