如何告诉 TeamCity 获取解决方案所需的源而不仅仅是 TFS 服务器路径?
我希望 TeamCity 根据给定的 Visual Studio 解决方案而不仅仅是 TFS 服务器上的路径从 TFS 下载最新版本。 构建服务器不应获取 TFS 上我们忘记添加到正确解决方案中的文件。
I want TeamCity to download the latest version from TFS based on a given Visual Studio solution not just a path on the TFS server.
The build server should not get files on TFS that we forgot to add to the correct solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将解决方案指定为构建文件
转到 TeamCity 管理 ->配置->跑步者(MSBuild)->构建文件路径
VCS Root 设置->客户端映射:指定 TC 应从哪些文件夹复制文件
Specify solution as build file
Goto TeamCity administration -> Configuration -> Runner (MSBuild) -> Build file path
VCS Root settings -> Client Mapping: specify from which folders TC should copy files
一个可能的解决方案是将您的构建签出模式配置为不自动签出文件。然后,编写一个自定义构建步骤来为您执行结账。但是,看起来只是检查解决方案是
您必须记住从解决方案内部引用每个文件,例如您的库依赖项,否则签出实际上不会获得所需的所有内容。
考虑到所有这些大惊小怪,我会更仔细地研究为什么你想要这种行为,并看看你是否可以重组你的解决方案/VCS路径来避免这个问题。
A possible solution is to configure your build Checkout Mode to not check out files automatically. Then, write a custom build step that will perform the checkout for you. But, it looks like checking out just the solution is a tricky problem itself. You'll probably want to write a custom MSBuild step (possibly writing a custom .NET task) or use PowerShell.
You'll have to remember to reference every file from inside the solution, like your library dependencies, or the checkout won't actually get everything it needs.
Looking at all this fuss, I would look harder at why you want this behavior and see if you can restructure your solution/vcs paths to avoid the problem all together.