如何使用持续集成服务器处理构建破坏外部依赖关系? (例如,Crystal Reports 与 TeamCity)
我刚开始使用持续集成,并决定使用 TeamCity。我遇到的一个问题是,由于缺少依赖项,我的代码无法编译。
(8, 7): 错误 CS0246: 找不到类型或命名空间名称“CrystalDecisions”(您是否缺少 using 指令或程序集引用?)
所以,我不太确定什么是在这里做的正确的事情。
- 我要安装水晶报表吗 可重新分发并让它永远放在那里?
- 我是否设置了我的 构建以便安装 Crystal 编译前的报告 所有测试完成后卸载 完全的?
- 其他一些选择我 不知道吗?
选项(1)似乎可能是一个问题,因为我可能有多个项目需要不同版本的 Crystal Reports,而且也许我无法将它们全部安装。选项(2)似乎可以通过命令行实现。我猜这是执行此操作的正常方法?
谢谢
I'm new to using continuous integration and have decided to go with TeamCity. One issue I have is that my code is not compiling due to a missing dependency.
(8, 7): error CS0246: The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?)
So, I'm not quite sure what is the proper thing to do here.
- Do I install the Crystal Reports
redistributable and just let it sit there forever? - Do I set up my
build so that it installs Crystal
Reports before compiling and
uninstalls after all the tests are
complete? - Some other option I
don't know about?
Option (1) seems like it might be an issue since I could have multiple projects that need different versions of Crystal Reports and perhaps I can't have them all installed. Option (2) seems like it might be possible through the command line. I'm guessing this is the normal way to do this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了简洁地回答您的问题,您应该在每个需要编译代码库的机器上安装可再发行组件,包括 TeamCity 构建代理,并无限期地将其保留在那里(从那时起,您应该只需要再次触摸该包即可更新它)根据您的应用程序可能需要更新到更高版本)。
通常,需要使用简单的开发环境和/或软件安装来设置 TeamCity 服务器(和/或其构建代理,如果使用分布式 CI 模型)。换句话说,构建代理将需要与开发环境编译应用程序所需的相同资源,除了完全安装 IDE(您可能正在使用 msbuild 或 nant),原因完全相同开发环境需要资源。这些资源包括但不限于:
确保这一切都存在的最简单方法是尽可能将其构建到您的解决方案架构中。
To answer your question succinctly, you should install the redistributable on every box that is expected to compile the codebase, including TeamCity build agents, and leave it there indefinitely (you should, from that point, only have to touch that package again to update it to a later version as your application may require).
Usually, the TeamCity server (and/or its build agents if using a distributed CI model) needs to be set up with a simplistic development environment and/or an installation of the software. Put another way, the build agent will need the same resources that the dev environment would need in order to compile the application, except for a full install of the IDE (you're probably using msbuild or nant instead), for exactly the same reasons that the dev environment needs the resources. Such resources include, but are not limited to:
The easiest way to ensure this is all present is to build it into your solution architecture where possible.