我正在尝试将 SQL Serve CE 与我的应用程序引导包一起安装。
这是我的代码:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="Bootstrapper" Version="1.0.0.0" Manufacturer="Billy"
UpgradeCode="4a2346e9-a126-43fb-a352-05a95623e0d4">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<PackageGroupRef Id="Netfx4Full"/>
<PackageGroupRef Id="SQLExpressCE"/>
<!-- Install Application -->
<MsiPackage Id="MyApplication" SourceFile="$(var.Installer.TargetPath)"/>
</Chain>
</Bundle>
<Fragment>
<!-- Check for .NET 4.0 -->
<util:RegistrySearch Root="HKLM"
Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
Value="Version"
Variable="Netfx4FullVersion" />
<util:RegistrySearch Root="HKLM"
Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
Value="Version"
Variable="Netfx4x64FullVersion"
Win64="yes" />
<!-- Install .NEt 4.0 -->
<PackageGroup Id="Netfx4Full">
<ExePackage Id="Netfx4Full"
DisplayName="Microsoft .NET Framework 4.0"
Compressed="no"
Cache="yes"
PerMachine="yes"
Permanent="yes"
Protocol="netfx4"
Vital="yes"
SourceFile=".\prerequisites\dotNetFx40_Full_x86_x64.exe"
InstallCommand="/passive /norestart"
DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
</PackageGroup>
<!-- Install SQL Server CE -->
<PackageGroup Id="SQLExpressCE">
<MsiPackage
Cache="no"
Compressed="no"
ForcePerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile=".\prerequisites\SSCERuntime-ENU.msi"
InstallCondition="NOT VersionNT64 AND SqlInstance AND SqlServerInstalled AND SQLServer2008R2Installed" />
<MsiPackage
Cache="no"
Compressed="no"
ForcePerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile=".\prerequisites\SSCERuntime-ENU-x64.msi"
InstallCondition="VersionNT64 AND NOT SqlInstance AND SqlServerInstalled AND SQLServer2008R2Installed" />
</PackageGroup>
</Fragment>
</Wix>
但是 .NET 4.0 安装得很好,我面临的唯一问题SQL Server CE
是没有安装包。会有什么问题?