有没有办法在同一解决方案中处理单独的项目(在源代码控制下分离)?
因此,我使用 git 源代码控制并使用其他存储库中的一些库来创建我的项目。但我也是这个库的开发人员,我想在我的项目中编辑/调试它们,这样我就可以将它添加到项目中,而不是像二进制 dll 那样,而是像另一个项目一样。
我找到了这篇文章:解决方案中的多个项目与源代码管理中的多个项目相比
但我在 Windows 上工作,通常只使用 Tortoise Git。我想以这种方式配置它真的很难。
还有另一个想法。不要将解决方案文件添加到版本控制并创建一些自述文件,其他开发人员必须如何构建项目及其依赖项。
也许有人已经遇到甚至解决了这样的问题,我很想知道它的任何解决方案和变体。
谢谢。
So I'm creating my project using a git source control and using some libraries from another repositories. But I'm also developer of this libraries and I want edit/debug them in my project so I can add it to project not alike binary dll but alike another project.
I found this article : Multiple projects in a solution vs. multiple projects in source control
But I'm working on Windows and usually just using Tortoise Git. I guess that will be really hard to configure it such way.
There is another idea. Do not add solution file to version control and create some readme how another developers must construct project and it's dependents.
Maybe someone already met or even solved such trouble, I'm interesting to know any solutions and variants for it.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在我曾经工作过的一家公司,我们最终将项目本身放入不同的存储库中,这使得管理它们比单一解决方案更容易。然后,我们编写了一个批处理文件,将所有部分重新组合在一起并正确编译(仅编译组件项目)。这可能并不适合所有人,但这只是一个建议。
我们这样做的原因是因为在 VS 中打开解决方案对于机器来说会占用大量内存,并且文件会变得非常混乱。
此外,还可以使用此功能,以便团队仅在其指定的软件上工作,并且实际上只能与其他组件进行通信。这是实施 3 层/n 层架构设计的好方法,因为您可以将项目分开,让团队/开发人员只关心他们正在做什么(虽然不是万无一失,但有帮助)。
At a company I used to work for, we ended up putting the projects themselves into different repo's which made managing them easier as opposed to 1 solution. We then wrote a batch file to simply put all the pieces back together and compile it correctly (just compiling the component Projects). This may not work for everyone but it is just a suggestion.
The reason we did this was because opening the solution in VS was getting to be very memory intensive for the machines and was becoming a giant mess of files.
Also this can be used so that teams only work on their specified software and can really only talk to the other components. This is a great way to enforce 3-tier/n-tier architecture design since you separate the projects out and let teams/developers only worry about what they're working on (not really fool proof but it helps).
在我们公司,我们通常有一个解决方案由多个项目组成,大多是十几个或几十个。这些来自不同的存储库,因为其中一些是通用库、框架等。但是,我们使用 SVN 和 VS AnkhSVN 插件,因此向多个存储库提交更改完全没有问题。
我对您的假设是检查 Git VS 插件是否可以在一种解决方案中与多个存储库配合使用。有关 Git VS 插件的更多信息,请参见:在 Visual Studio 中使用 Git
顺便说一句,根据 '一个或多个存储库的讨论 - 我们为一个项目创建一个存储库。因此,如果项目有多个部分,并且其中一些部分之前已经存在,并且很可能会继续存在,那么这些部分不应放置在项目存储库中。如果项目中诞生了一些伟大的东西,并且我们相信这将超越它 - 我们总是可以将存储库子树迁移到独立的 SVN 存储库。
In our company we usually have a solution consist of several projects, mostly dozen or several dozens. Those are coming from different repos 'cause some of those are general purpose libs, frameworks etc. We, however, use SVN with VS AnkhSVN plugin so there are completely no issues with commiting changes to more than one repo.
My assumption for you is to check whether Git VS plugins could work with seeral repos in one solution. More info on Git VS plugins here: Using Git with Visual Studio
BTW, accroding to 'one or many repos' discussion - we create one repo for a project. So if there are several parts of the project and some of those existed before and will most probably keep being after - those should not be placed in the project repo. Should something great be born within the project and we do believe this will overlive it - we could always migrate repo subtree to an independent SVN repo.