SlowCheetah不会在构建时转换文件 [英] SlowCheetah not transforming file on build
问题描述
我有一个项目正在尝试使用SlowCheetah. 我已经创建了我的配置文件(Test.web.config)和我要使用的所有转换 (Debug_Mock.config,Debug_SQL.config,发行版) 在我的Build配置中,我有一个post-build事件,应该将转换后的文件复制到另一个目录,但是找不到该文件
I have a project I am trying to use SlowCheetah for. I have created my config file (Test.web.config) and all the transformations I want to use (Debug_Mock.config, Debug_SQL.config, Release) in my Build configuration I have a post-build event is supposed to copy the transformed file into another directory but the file cannot be found
(错误xcopy退出,代码为4)
(error xcopy exited with code 4)
SlowCheetah似乎并没有像我期望的那样转换文件并将其放置在输出目录(bin文件夹)中. 是否有人对为什么它没有发生有任何想法,也许是某个地方的设置?
SlowCheetah doesn't seem to be transforming the file and placing it in the output directory (bin folder) like I would expect. Does anyone have any ideas as to why it is not happening, maybe a setting somewhere?
仅供参考:此过程可在具有相同项目的另一台机器上运行.据我所知,同样的设置.但是我可能找不到正确的位置.
FYI: This process works on another machine, with the same project. As far as I can tell the same set up as well. But I may not be looking in the correct place.
推荐答案
-
启用构建详细信息(
Tools -> Options -> Projects and Solutions -> Build and Run
),并查看有效版本与无效版本之间的区别.Enable build verbosity (
Tools -> Options -> Projects and Solutions -> Build and Run
) and see the difference between the version that is working and the one that is not.据我所知,慢速猎豹支持
app.config
文件的配置转换,但是 目前不在调试时web.configs
.它应该将转换后的web.config
文件放在项目的bin
文件夹中,但是您的项目仍从根文件夹中的config file
读取.请在以下位置查看构建前/构建后事件 http://sedodream.com/CommentView,guid,68b7e248-b9f5-4d07-bdfe- eb037bcf2cbb.aspx .To my knowledge, slow-Cheetah supports config transforms for the
app.config
files but notweb.configs
on debug at present. It should put a transformedweb.config
file in thebin
folder of your project but your project still reads from theconfig file
in the root folder. Please have a look at pre/post build events at http://sedodream.com/CommentView,guid,68b7e248-b9f5-4d07-bdfe-eb037bcf2cbb.aspx.您可以在以下位置请求调试时的Web配置转换支持:
https://github.com/sayedihashimi/slow-cheetah/issues/39You can request for web config transform support on debug at
https://github.com/sayedihashimi/slow-cheetah/issues/39尝试重新安装Slow-Cheetah.
Try re-installing Slow-Cheetah.
这篇关于SlowCheetah不会在构建时转换文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!