【发布时间】:2013-04-08 03:02:03
【问题描述】:
我正在使用 Slow Cheetah 为控制台应用程序转换 app.config 文件。 在构建期间,我还调用此应用程序。最初我使用构建后事件,但后来我意识到 Slow Cheetah 转换在构建后事件之后运行,所以我使用了这里解释的解决方案:
SlowCheetah executes after post-build events
所以基本上,在我的迁移项目中,我有以下部分(用于诊断的回声/类型)
<Target Name="AfterBuild" AfterTargets="TransformAllFiles">
<Exec Command="Echo $(OutputPath)" />
<Exec Command="Type $(OutputPath)Migrations.exe.config" />
<Exec Command="$(OutputPath)Migrations.exe" />
</Target>
这在本地效果很好。但是,当部署到 CI 服务器(CruiseControl + MSBuild 4.0)时,我观察到奇怪的行为。这些任务现在“在”Slow Cheetah 之前运行。为了验证我“输入”配置文件,我可以看到它没有被转换。但是,一旦构建完成并进入构建框,我会在同一位置看到已转换的文件。
所以,Slow Cheetah 正在完成它的工作,但在这些任务运行之后出于某种原因。 有什么建议可以解决吗?
【问题讨论】:
标签: .net cruisecontrol.net msbuild-4.0 slowcheetah