TeamCity - 编译错误(第三方参考程序集和命名空间)

发布于 2024-12-04 18:14:39 字数 548 浏览 2 评论 0原文

我在构建服务器上安装了 TeamCity,在另一台服务器上安装了 TFS。两者都经过配置和设置,以便当通过 TFS 签入代码时,Teamcity 会检测到这些更改并构建解决方案。我能够成功地进入这个阶段的设置。但是当我运行构建配置时,我在 TeamCity 中遇到很多编译错误...所有错误都类似于“缺少某某程序集引用...或者找不到名称空间...我怎样才能包含引用对于构建服务器中缺少的程序集或命名空间..我能够在本地开发计算机(具有所有第三方引用)中手动构建成功...但它在团队城市构建服务器中失败..任何人都有解决这个问题..请让我知道..谢谢

The type or namespace name 'Rhino' could not 
be found (are you missing a using directive    
an assembly reference?) 
The type or namespace name 'Ioperation' could not be found (are you missing a
using directive or an assembly reference?)

I have TeamCity installed on build server and TFS on another server. Both are configured and set up so that when code is checked in via TFS, Teamcity detects those changes and builds the solution. I am able to successfully get to this stage of the set up. But I am getting lot of compile errors in TeamCity when I run a build configuration... All errors are like "so and so assembly reference is missing ... or name space could not be found... How can I include the references for those missing assemblies or namespaces in the Build server.. I am able to manually build successfully in my local development machine (which has all the third party references)... but it fails in the team city build server .. any one has a work around for this.. please let me know.. thank you

The type or namespace name 'Rhino' could not 
be found (are you missing a using directive    
an assembly reference?) 
The type or namespace name 'Ioperation' could not be found (are you missing a
using directive or an assembly reference?)

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

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

发布评论

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

评论(1

浪漫之都 2024-12-11 18:14:39

你有两个选择。

  1. 在代理计算机上安装第 3 方程序集。如果可能,您应该避免这种情况,因为它会使代理维护/添加新代理成为一场噩梦。

  2. 将您的第 3 方程序集存储在源代码控制存储库中,然后在运行构建时使用代理上的代码进行检出。在 Subversion 中你可以通过外部来做到这一点;我以前从未使用过 TFS,但我认为有一个类似的功能。 这个问题的答案似乎是合理的。

构建工作所需的所有内容(例如源代码、第三部分程序集、资源等)都应存储在存储库中。这使得更新第 3 方程序集版本和扩展您的代理场变得更加容易

HTH

You've got two options.

  1. Install the 3rd party assemblies on the Agent machine. You should avoid this if possible as it makes Agent maintance/adding new Agents a nightmare.

  2. Store your 3rd party assemblies in your source control repository which are then checked out with your code on the Agent when a build is run. In Subversion you can do this with externals; I've never used TFS before but I assume there is a simular feature. The answer to this SO question seems reasonable.

Everything you need to make your build work (e.g source code, 3rd part assemblies, resources etc) should be stored in your repository. This makes updating 3rd party assembly versions and scaling your Agent farm much easier

HTH

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