Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you organise open-source Visual Studio projects with open-source dependencies?

I've started an open source MVC4 project that is using some other open source project as a dependency. I've forked the other project and will be modifying it according to my needs. The problem I'm facing is how to keep these projects depending on each other, but maintained separately. Yet people who git pull my project, would get the dependency project as well?

  1. I can slam all the related code from other project into my repository, but this way I won't be able to contribute to a fork of dependent project. I'll just become a part of my repository. Not really want to do that.
  2. I can maintain other project completely separately and copy *.dll files into my project. And commit dependent dll files into git. This is nice, but I loose ability to develop two projects at the same time, along with stepping into dependent code on debug (well, maybe not if copy *.pdb files along)
  3. Similar to point 2, I can build nuget packages from dependent project and add them to my main project - again, can't really develop both projects at the same time, need to switch contexts.
  4. With some magic have a solution file that combines projects from my repository and from dependent repository. On every build, copy dependent dll files to /lib folder and commit them. This way I don't need to switch contexts between separate projects. But the drawback is when other contributors git pull my project, they don't get dependent project, and solution files will likely be broken for them, because it'll reference project that is not in the repo.

How do you organise your code in this case?

like image 528
trailmax Avatar asked Mar 12 '13 22:03

trailmax


Video Answer


1 Answers

Usually I use nuget for all my dependencies. When I fork a project I will deploy it on nuget and also on symbol source. In this way you can step inside the dependency source without problems.

For more information on symbol source and nuget see also: Creating and Publishing a Symbol Package. To enable symbol source debug see http://www.symbolsource.org/Public/Home/VisualStudio.

You must also remember to enable Nuget package restore.

With this solution you can't modify source code but at least you can debug it.

like image 107
Davide Icardi Avatar answered Oct 19 '22 01:10

Davide Icardi