SlowCheetah在构建后事件后执行

编程入门 行业动态 更新时间:2024-10-26 18:20:33
本文介绍了SlowCheetah在构建后事件后执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用SlowCheetah来转换我的app.configs.我有一个多项目解决方案,其中一个项目执行构建后事件,其中bin的输出复制到其他位置.我发现SlowCheetah会在构建后事件之后进行转换,因此我要复制的app.config是预先转换的版本.

I use SlowCheetah to transform my app.configs. I have a multi-project solution where one of the projects executes a post-build event where the output of the bin is copied elsewhere. I've found that SlowCheetah does it's transforms after the post-build event, so the app.config I'm copying is the pre-transformed version.

有人对SlowCheetah转换后如何执行我的副本提出建议吗?这是否需要我编写自定义构建任务?

Does anyone have a suggestion of how I can execute my copy after the SlowCheetah transforms? Is this going to require that I write a custom build task?

推荐答案

如果您使用msbuild 4.0来构建项目,则可以使用新的AfterTargets BeforeTargets属性连接到慢猎豹目标.

If you are using msbuild 4.0 for building your projects - you can hook to slowcheetah targets with new AfterTargets BeforeTargets attributes.

我不知道您想使用的目标名称到底是什么,但是这段代码可以为您提供基本的概念

I dont know what exactly target name you want to hook after but this code could gave you base concept how to do this

<Project ToolsVersion="4.0" xmlns="schemas.microsoft/developer/msbuild/2003"> <Target Name="Some_Target_Name" AfterTargets="TransformAllFiles" > <Message Text="= Script here will run after SlowCheetah TransformAllFiles ="/> </Target> <Project>

我安装了SlowCheetah,发现AfterTargets属性应该是"TransformAllFiles". 只需设置您的目标依赖项AfterTargets="TransformAllFiles"

Edited: I installed SlowCheetah and found that AfterTargets attribute should be "TransformAllFiles". Just set up your target dependency AfterTargets="TransformAllFiles"

更多推荐

SlowCheetah在构建后事件后执行

本文发布于:2023-11-03 01:19:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1553895.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:事件   SlowCheetah

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!