维克斯 |在安装时删除 *.config 文件 [英] WIX | Remove *.config file on install

查看:27
本文介绍了维克斯 |在安装时删除 *.config 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多个配置文件(针对不同的环境).在安装期间,用户可以选择环境,并根据该环境复制正确的文件.我想删除未使用的额外文件.
我正在使用,但它似乎不起作用.我没有收到任何错误,在日志中我看到操作正在执行,但文件没有被删除.谁能指出我做错了什么?

 <RemoveFile Id="RemoveConfigs" Name="???_*.config" On="install"/></组件>

我的 RemoveFile 表也看起来像

<前>FileKey 组件 FileName DirProperty InstallModeRemoveExtraConfigFiles RemoveExtraFiles p6wjlh9a.con|Web_*.config INSTALLDIR 1

仍然没有删除任何东西

解决方案

RemoveFileCopyFile 总是在 InstallFiles 之前运行,并且发现没有安装目录中的文件,因此失败.

I have multiple config files (for different environments). During install user get to select the environment, and based on that correct files are copied. I want to delete the extra files that are not used.
I am using but it doesn't seem to be working. I don't get any errors as such, in the log I see action getting executed but files are not deleted. Can anyone please point what I am doing wrong?

  <Component Id="RemoveFiles" Guid="C5D634C2-744E-4CA5-BB44-F3DE88482AB5">
    <RemoveFile Id="RemoveConfigs" Name="???_*.config" On="install" />
  </Component>

My RemoveFile table also looks like

FileKey                 Component           FileName                    DirProperty InstallMode
RemoveExtraConfigFiles  RemoveExtraFiles    p6wjlh9a.con|Web_*.config   INSTALLDIR  1

Still it's not deleting anything

解决方案

RemoveFile or CopyFile always run before InstallFiles, and it finds no files in the install directory, hence it fails.

这篇关于维克斯 |在安装时删除 *.config 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆