【问题标题】:WIX Installer error during the build构建期间出现 WIX 安装程序错误
【发布时间】:2015-11-25 14:41:35
【问题描述】:

我尝试学习如何在 Visual Studio 2012 上使用 WIX 进行安装程序,首先我创建了一个 HelloWorld 项目来测试 WIX 并进行简单的配置。但是我在构建过程中遇到了一个错误:它说我:

“无法打开数据库。在验证期间,这通常发生在尝试使用不受支持的代码页或不是有效 Windows Installer 数据库的文件打开数据库时。请在 Module/@ 中使用不同的代码页Codepage、Package/@SummaryCodepage、Product/@Codepage 或 WixLocalization/@Codepage;或确保提供有效 Windows Installer 数据库的路径。light.exe 0 1 SetupProject1"

我看到了几种解决方案,例如更改 XML 的编码,将 utf-8 转换为 utf-16。而且我也尝试删除编码语句。但它没有任何改变。

这是我的 WIX XML:

    <?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="54612752-7163-4B36-8CA6-01615090CD7F" Name="WIXTestSetup" Language="1033" Codepage="1252" Version="1.0.0.0" Manufacturer="MyCompany Ltd."
  UpgradeCode="1756bfd5-c713-412a-9524-fb1b72886116">
    <Package Id="*" Keywords="Installer" Description="My WIXTest Installer" Languages="1033" SummaryCodepage="1252" InstallerVersion="200"
    Compressed="yes" InstallScope="perMachine" Comments="WIXTest Installer is a registered trademark of MyCompany and Co.Ltd" />
    <Media Id="1" Cabinet="Sample.cab" EmbedCab="yes" DiskPrompt="CD-ROM #1" />
    <Property Id="DiskPrompt" Value="WIXTestSetup Installation [1]"/>
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />


    <Feature Id="ProductFeature" Title="WIXTestSetup" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
    </Feature>
  </Product>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="MyCompany" Name = "MyCompany" >
          <Directory Id="INSTALLFOLDER" Name="WIXTestSetup" />
        </Directory>
      </Directory>
    </Directory>
  </Fragment>

  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
      <Component Id="MainExecutable" Guid="4BFF8919-9C07-4BBE-BD1C-46AB49524566">
        <!-- TODO: Insert files, registry keys, and other resources here. -->
        <File Id="WIxTestExe" Name ="WIXTest.exe" DiskId="1" Source="D:\PROJETS VISUAL STUDIO\Projects\MyFirstWIXProject\MyFirstWIXProject\bin\Debug\MyFirstWIXProject.exe" KeyPath="yes" />
      </Component>
      <Component Id="ProgramFilesFolder" Guid="53B3FC8A-9D2B-4CDD-BE68-D155435C6163">
        <RemoveFolder Id="ProgramFilesFolder" On="uninstall"/>
      </Component>
    </ComponentGroup>
  </Fragment>
</Wix>

我还检查了“CodePage”和“SummaryCodePage”,但我还没有解决构建问题。

我也试过了:WiX ICE validation errors

你有什么想法来解决它吗?

【问题讨论】:

标签: visual-studio-2012 wix setup-project wix3.5


【解决方案1】:

在数据库验证步骤中,light.exe 尝试重新打开 MSI 文件以进行读/写访问,同时防病毒扫描已创建的新 msi 文件。

尝试执行以下操作:

  1. 从实时病毒扫描中排除临时目录。
  2. 在 Windows 的区域设置中添加英语输入语言。
  3. 禁用 ICE 验证。转到 wix 项目属性,工具设置,然后选中“抑制 ICE 验证”。

您可以在此处查看与此主题相关的讨论:

Error LGHT0301: Failed to open the database

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-05-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多