且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

带有DTF的WiX自定义操作...相当困惑

更新时间:2022-02-28 08:31:36

我们能否回到为什么您认为您需要暂时执行自定义操作的原因?

Can we get back to why you think you need a custom action for a moment?

根据您要解决的问题,您应该可以执行以下两项操作之一

Depending on the problem you are trying to solve you should be able to do one of two things

1)将XML文件放入其自己的组件中,标记为密钥文件并设置为永久文件.

1) Put the XML file in it' own component, marked as keyfile and set to permanent.

2)创建一个虚拟DLL,并为其提供1.0.0.0的版本.以后永远不要增加此DLL的版本号.将DLL和XML文件放入DLL设置为密钥文件且该组件设置为永久性的组件中.

2) Create a dummy DLL and give it a version of 1.0.0.0. Never increment this DLL's version number in the future. Put the DLL and XML file in a component with the DLL set to keyfile and the component set to permanent.

您现在应该可以进行重大升级,并保留XML文件的内容,而不管是否曾经对其进行过修改以包括用户数据.

You should now be able to do major upgrades and persist the contents of the XML file regardless of whether it's ever been modified to include user data or not.