问题描述
我们正在使用 TFS 2015.我想创建一个构建,然后触发一个发布(使用 RM).我们有一个 web 项目和一个 wpf 应用程序.在代码内部,我们有编译器指令(#if DEBUG).并且必须执行配置转换.
We are using TFS 2015. I'd like to create a build and then trigger a release (with RM). We have a webproject and a wpf app. Inside of the code we have compiler directives (#if DEBUG). And the config transformation has to be executed.
我的方法是为调试和发布创建一个版本,发布它并将其复制到放置文件夹.谁能告诉我实现这一目标的最佳方法是什么?
My approach was to create a build for Debug and Release, publish it and copy it to a drop folder.Can anyone tell me what is the best way to achieve this?
提前致谢.
推荐答案
如果要触发基于代理的发布,可以使用自定义构建任务:
If you want to trigger an agent-based release, you can use a custom build task:
https://github.com/incyclesoftware/build-tasks
(完全披露:我创建了这些任务.)
(Full disclosure: I created these tasks.)
当您部署基于任务的构建时,请确保 Release Management 中的组件与您在构建中发布的工件命名相同.
When you deploy a task-based build, make sure the component in Release Management is named the same thing as the artifact you published in the build.
这篇关于vNext 构建和发布管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!