[英]How should I manage/declare dependencies between open source C# projects?
I've got a game (a roguelike to be specific) in C# that I'm in the process of cleaning up to open source. 我在C#中有一个游戏(roguelike具体),我正在清理开源。 One step I'd like to take is splitting it into three distinct pieces:
我想采取的一个步骤是将其分为三个不同的部分:
Right now, these are all separate projects in the same solution, but I'd kind of like to make them completely separate projects (in the "open source project" sense, not the "visual studio project" use of the term) with their own names and repos. 现在,这些都是同一解决方案中的独立项目,但我有点想让它们完全独立的项目(在“开源项目”意义上,而不是“视觉工作室项目”使用该术语)与他们的自己的名字和回购。 I think, at the very least, #1 is generally useful even if you aren't building game, and I don't want someone to have to build an entire game just to get some handy functions.
我认为,至少#1通常很有用,即使你没有建立游戏,我也不希望有人为了获得一些方便的功能而必须建立整个游戏。
What I'm not sure about is how to handle the dependencies if I split up the solution. 我不确定的是,如果我拆分解决方案,如何处理依赖关系。 If someone decides they want to sync the game, how should I ensure they also get 1 and 2?
如果某人决定要同步游戏,我该如何确保他们也获得1和2?
I would go with your option 1. If I as a user want to work on the game project, I do not care about the other two projects, but the game needs it, so include the dll. 我会选择1.如果我作为用户想要参与游戏项目,我不关心其他两个项目,但游戏需要它,所以包括dll。
If I want to make changes to the utility classes, well I then make changes to the utility project. 如果我想对实用程序类进行更改,那么我就可以对实用程序项目进行更改。
It is like me using another party's open source project in my own. 就像我自己使用另一方的开源项目一样。 When the other party's lib needs changes I go and make it there and then just get the latest .dll for this project as a dependency.
当对方的lib需要更改时,我会去那里然后只是获取该项目的最新.dll作为依赖项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.