你如何组织开放源代码的Visual Studio项目与开放源代码的依赖? [英] How do you organise open-source Visual Studio projects with open-source dependencies?

查看:126
本文介绍了你如何组织开放源代码的Visual Studio项目与开放源代码的依赖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始正在使用其他一些开源项目作为一个依赖一个开源项目MVC4。我已经分叉的其他项目,并会根据我的需要来修改它。我现在面临的问题是如何让这些项目依赖于对方,但单独进行维护。然而,谁的git拉我的项目的人,将得到的依赖项目呢?

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. 我可以踩住从其他项目中的所有相关代码到我资源库,但这样一来我就不能有助于依赖项目的一个分支。我会成为我的资源库的一部分。不是真的想这样做。

  2. 我可以完全分开维护其他项目和* .dll文件复制到我的项目。并提交相关的dll文件到饭桶。这是很好的,但我失去开发两个项目的同时,与步入相关的代码上调试(好吧,也许不是,如果复制* .pdb文件一起)

  3. 类似的能力,以及点2,我可以建立从依赖项目的NuGet包,并将其添加到我的主要项目 - 再次,不能真正在同一时间开发两个项目,需要切换上下文

  4. 随着一些魔法有项目结合起来,从我的仓库和相关的存储库中的解决方案文件。在每一个构建,相关的DLL文件复制到/ lib文件夹并提交他们。这样我就不需要单独的项目之间切换上下文。但缺点是,当其他贡献者的git拉我的项目,他们没有得到相关的项目和解决方案文件可能会被打破他们,因为它会引用的项目,是不是在回购协议。

  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?

推荐答案

通常我用我所有的依赖的NuGet。当我叉一个项目,我将部署它的NuGet还对符号源。通过这种方式,你可以依赖源内部步骤没有任何问题。

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.

有关符号来源和更多信息的NuGet还看到:
Creating和发布符号封装
启用符号的代码调试看 http://www.symbolsource.org/Public/Home/VisualStudio

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.

您还必须记得使的的NuGet包还原

通过这个解决方案不能修改的源代码,但至少可以调试。

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

这篇关于你如何组织开放源代码的Visual Studio项目与开放源代码的依赖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆