操作方法:使用 TeamCity 引用外部 SLN 文件

发布于 2024-08-09 01:19:00 字数 536 浏览 2 评论 0原文

我是 TeamCity 的新手,我们在源代码控制下有许多常见项目,然后在相关项目中直接引用这些项目,即:

Common
  branches
  tags
  trunk
    CommonProject
      CommonProject.csproj
    Common.sln
ProjectX
  branches
  tags
  trunk
    ProjectX.sln

因此,“ProjectX.sln”中对“CommonProject.csproj”的引用是这样的....\Common\trunk\CommonProject\CommonProject.csproj 这在我们的开发环境中很好,但是当涉及到 TeamCity 时,它会说找不到路径“....\Common\trunk\CommonProject” \CommonProject.csproj"

解决此问题的最佳方法是什么?我已经尝试将 CommonProject 添加到 TeamCity 作为依赖项,但它似乎仍然不想发挥作用...

谢谢

Tim

I'm new to TeamCity and we have a number of common projects under source control that are then referenced directly within relevant projects i.e.:

Common
  branches
  tags
  trunk
    CommonProject
      CommonProject.csproj
    Common.sln
ProjectX
  branches
  tags
  trunk
    ProjectX.sln

As a result, the reference to "CommonProject.csproj" in "ProjectX.sln" is something along the lines of ....\Common\trunk\CommonProject\CommonProject.csproj which is fine within our development enviroments but when it comes to TeamCity it falls over saying it can't find the path "....\Common\trunk\CommonProject\CommonProject.csproj"

What's the best way around this problem? I've tried adding CommonProject to TeamCity as a dependancy but it still doesn't seem to want to play ball...

Thanks

Tim

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只为一人 2024-08-16 01:19:00

我们通过使用 Subversion 中的外部来解决这个问题,它允许您从不同的(部分)存储库中提取内容。

然后,当我们构建解决方案时,我们将这些常见项目与项目特定解决方案分组到相同的文件夹中 - 即,当我们检查内容时,我们有:

Solution1
   +---Project1
   +---Project2
   +---Project3
   +---Common1
   +---Common2

然后,分别:

Solution2
   +---ProjectA
   +---ProjectB
   +---ProjectC
   +---Common1
   +---Common2

因为我们设置了外部和目录/文件夹结构这样,理论上,您应该能够签出(或导出)一个“解决方案”到一个空目录,并从头开始成功构建它(取决于安装的所有必要工具),因此 TeamCity(或任何您持续使用的工具)集成服务器)应该也能够从头开始构建它。事实上,甚至在我们开始使用 TeamCity 之前,我就已将此作为策略,但一旦开始进行持续集成,其价值就更加清晰。

Subversion 红皮书的相应部分位于:外部定义< /a>

We address this by using Externals in Subversion which allows you to pull in stuff from a different (bit of the) repository.

Then, when we're building the solutions, we have those common projects grouped into the same folders with project specific solution - i.e. when we check stuff out we have:

Solution1
   +---Project1
   +---Project2
   +---Project3
   +---Common1
   +---Common2

Then, separately:

Solution2
   +---ProjectA
   +---ProjectB
   +---ProjectC
   +---Common1
   +---Common2

Because we have the externals and the directory/folder structure set up this way you should, in theory, be able to checkout (or export) a "solution" to an empty directory and have it build successfully from scratch (subject to all the necessary tools being installed) and therefore TeamCity (or whatever your continuous integration server is) should be able to also be build it from scratch. In fact even before we stared using TeamCity I had this as policy but the value is clearer once you start doing continuous integration.

The appropriate bit of the Subversion Red Book is here: Externals Definitions

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文