在 Subversion 中为 Visual Studio 项目构建存储库的最佳方法? [英] Best way to structure a repository in Subversion for Visual Studio projects?

查看:43
本文介绍了在 Subversion 中为 Visual Studio 项目构建存储库的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个 C# .dll 项目,它们对许多应用程序都是通用的.目前,我有一个大存储库.我将每个 DLL 作为一个单独的项目存储在存储库中,每个应用程序项目作为一个项目存储在同一个存储库中.

I have a few C# .dll projects which are common to many applications. Currently, I have one big repository. I have each DLL stored as a separate project within the repository and every application project stored as a project within the same repository.

我最近切换到 Subversion 进行源代码控制,但我担心我没有做好构建存储库的工作.我想听听其他人在做什么.

I recently switched to Subversion for source control and I fear that I did not do a good job of structuring the repository. I would like to hear what others are doing.

推荐答案

使用 branch/trunk/tag 存储库结构是相当标准的,但如果我正确理解你,你的问题是你有一组通用的 dll跨多个项目使用的项目.这肯定会变得难以管理.

using the branch/trunk/tag repository structure is pretty standard, but if I'm understanding you properly, your issue is that you have a set of common dll projects that get used across multiple projects. This can definately become tricky to manage.

所以这里的典型场景是您有一些名为 Common.Helpers 的类库,其中包含所有应用程序通用的代码.

So the typical scenario here is that you have some class library called Common.Helpers that has code that is common to all your applications.

假设我正在启动一个名为 StackOverflow.Web 的新应用程序,它需要引用 Common.Helpers.

Let's say I'm starting a new application called StackOverflow.Web that needs to reference Common.Helpers.

通常您要做的是创建一个新的解决方案文件并添加一个名为 Stackoverflow.Web 的新项目并添加现有的 Common.Helpers 项目,然后从新的 Stackoverflow.Web 项目中引用它.

Usually what you would do is create a new solution file and add a new project called Stackoverflow.Web and add the existing Common.Helpers project and then reference it from the new Stackoverflow.Web project.

我通常尝试做的是为 Common.Helpers 项目创建一个存储库,然后在 subversion 中将其引用为 外部.这样一来,您就可以将源代码控制在一个位置,但仍可在多个项目中单独使用.

What I usually try and do is create a repository for the Common.Helpers project and then in subversion reference it as an external. That way you can keep the code under source control in a single location, but still use it seperately in multiple projects.

这篇关于在 Subversion 中为 Visual Studio 项目构建存储库的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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