我嘗試學習如何在Visual Studio 2012上使用WIX安裝安裝程序,首先創建一個HelloWorld項目來測試WIX並進行簡單的配置。但我在建築物出現錯誤:它說我:WIX安裝程序在構建期間出錯
「無法打開數據庫。在驗證期間,這最常發生在嘗試使用不受支持的代碼頁或無效的文件打開數據庫時Windows Installer數據庫請在Module/@ Codepage,Package/@ SummaryCodepage,Product/@ Codepage或WixLocalization/@ Codepage中使用不同的代碼頁;或者確保提供有效Windows Installer數據庫的路徑。 1 SetupProject1「
我看到幾個解決方案,比如改變XML的編碼,用utf-16切換utf-8。我也嘗試刪除編碼語句。但它沒有改變。
這裏是我的維克斯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>
我還要檢查「代碼頁」和「SummaryCodePage」,但我還沒有解決構建問題。
我已經試過了太:WiX ICE validation errors
有你一些想法解決它?
可能有關? http://stackoverflow.com/questions/14840233/error-lght0301-failed-to-open-the-database – sjdowling