随着维克斯,分发使用SQLite的程序(必须工作在32位和64位)维克、程序、工作、SQLite

2023-09-08 01:13:33 作者:宅久天然呆

使用WiX的,我想分发使用SQLite的C#程序。

With WiX, I want to distribute a C# program that uses SQLite.

SQLite的建议如下中的文件结构,所以我使用它:

SQLite recommends the files structure below, so I use it:

在维克斯,我创建的 86 和 64 文件夹,并把正确的DLL中的每个:

In Wix, I create the x86 and x64 folders and put the right DLL in each:

 <Directory Id='x86' Name='x86'>
   <Component Id='x86' Guid='...'>
     <CreateFolder />
     <File Id='f86' Name='SQLite.Interop.dll' Source='x86\SQLite.Interop.dll' />
   </Component>
 </Directory>
 <Directory Id='x64' Name='x64'>
   <Component Id='x64' Guid='...'>
     <CreateFolder />
     <File Id='f64' Name='SQLite.Interop.dll' Source='x64\SQLite.Interop.dll' />
   </Component>
 </Directory>

问题:维克斯说错误LGHT0204:ICE99:目录名称:64位是一样的MSI的公共属性之一,并可能导致不可预见的副作用

提示:如果我从维克斯脚本删除这两个目录,然后手动将它们复制到安装程序所在的地方,那么它的工作原理。这听起来很愚蠢,但也许解决方案是创建在维克斯脚本x86_和x64_目录,并在第一次执行程序?

Tip: If I remove the two directories from the WiX script, and then copy them manually to the place where the program is installed, then it works. It sounds dumb, but maybe the solution is to create x86_ and x64_ directories in the WiX script, and rename them at first execution of the program?

推荐答案

没有问题的SQLite。您正在使用64位的目录编号。这是这里的问题。 ICE99 抛出错误,如果您使用保留的财产目录ID例如 WindowsVolume

There is no issue with SQLite. You are using x64 as the Directory ID. This is the issue here. ICE99 throws error if you use any Windows reserved property as Directory ID like WindowsVolume.

您必须更改的x64目录编号。这将解决这个问题。

You have to Change the x64 directory ID. It will fix this issue.

  <Directory Id='DIR_x64' Name='x64'>
 
精彩推荐
图片推荐