2015-09-08 41 views
4

我做了一个超级简单的wix引导程序并在Visual Studio 2015中安装项目(并在2013年尝试过,结果相同)。引导程序将发布一个消息框并退出,但出现错误“加载先决条件引导程序应用程序,因为托管主机无法加载,错误:0x80070490。”我不知道那个错误代码的含义。Wix托管主机无法加载

它会直接尝试安装已存在的.Net 4.5,然后退出。

我的程序集有BootstrapperApplicationAttribute,指向正确的类。引导程序应用程序是一个.Net 4.5 WPF用户控制库。

下面是完整的日志 编辑:最新的日志使用最新更改的

[3AB8:2C8C][2015-09-10T14:44:59]i001: Burn v3.10.0.2026, Windows v6.3 (Build 9600: Service Pack 0), path: E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\Bootstrapper1.exe 
[3AB8:2C8C][2015-09-10T14:44:59]i009: Command Line: '/log log.txt' 
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleLog' to value 'E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\log.txt' 
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleOriginalSource' to value 'E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\Bootstrapper1.exe' 
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\' 
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleName' to value 'Bootstrapper1' 
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'WixBundleManufacturer' to value 'Myself' 
[3AB8:2C8C][2015-09-10T14:44:59]i000: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80070490. 
[3AB8:3C74][2015-09-10T14:44:59]i000: Setting numeric variable 'WixStdBALanguageId' to value 1033 
[3AB8:3C74][2015-09-10T14:44:59]i000: Setting version variable 'WixBundleFileVersion' to value '1.0.0.0' 
[3AB8:2C8C][2015-09-10T14:44:59]i100: Detect begin, 2 packages 
[3AB8:2C8C][2015-09-10T14:44:59]i000: Setting string variable 'NETFRAMEWORK45' to value '393297' 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {14998a68-ae2d-4209-b77e-a3f04dd57a37}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {1e5997c3-1ce9-4ba9-b0dd-8b23dbc2ae5b}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {464b46a0-9c95-4a9a-a09c-cc05eabded4e}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {5b9e54c5-39fe-4438-9d7a-5d97ace1a57f}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {5e80916f-30ff-4791-97df-a503198504c5}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {6c9fdff8-7e6b-4365-8509-18fc5394599e}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {97cba9a5-0ec5-40cc-ac89-30e790e81755}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {b4cc8c31-ee10-4566-a13d-7a8ab7c77ea9}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {d51bb1d2-e28b-467d-ac56-7dcf93a9b838}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i102: Detected related bundle: {fc6f26ca-2fa0-426d-acdb-bb350bc7a3db}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: None 
[3AB8:2C8C][2015-09-10T14:44:59]i052: Condition 'NETFRAMEWORK45 >= 378389' evaluates to true. 
[3AB8:2C8C][2015-09-10T14:44:59]i101: Detected package: NetFx45Redist, state: Present, cached: None 
[3AB8:2C8C][2015-09-10T14:44:59]i101: Detected package: SetupProject1.msi, state: Absent, cached: None 
[3AB8:2C8C][2015-09-10T14:44:59]i199: Detect complete, result: 0x0 
[3AB8:2C8C][2015-09-10T14:45:03]i500: Shutting down, exit code: 0x642 
[3AB8:2C8C][2015-09-10T14:45:03]i000: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: NETFRAMEWORK45 = 393297 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleAction = 5 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleElevated = 0 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleFileVersion = 1.0.0.0 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleInstalled = 0 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleLog = E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\log.txt 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleManufacturer = Myself 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleName = Bootstrapper1 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleOriginalSource = E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\Bootstrapper1.exe 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleOriginalSourceFolder = E:\Projects\WpfApplication1\Bootstrapper1\bin\Release\ 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleProviderKey = {0112e2c7-f979-4afe-a3fd-6be0231f6727} 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleTag = 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixBundleVersion = 1.0.0.0 
[3AB8:2C8C][2015-09-10T14:45:03]i410: Variable: WixStdBALanguageId = 1033 
[3AB8:2C8C][2015-09-10T14:45:03]i007: Exit code: 0x642, restarting: No 

编辑:这里是BootstrapperApplicationRef部分。我已经尝试过,没有BootstrapperCore.dll和Microsoft.Deployment.WindowsInstaller.dll。有没有其他的依赖超出标准的.NET库

<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost"> 
    <Payload Name='BootstrapperCore.config' SourceFile="..\VerySimpleBurnApp\VerySimpleBurnApp.BootstrapperCore.config"/> 
    <Payload SourceFile="..\VerySimpleBurnApp\bin\Release\VerySimpleBurnApp.dll"/> 
    <Payload SourceFile="..\VerySimpleBurnApp\bin\Release\BootstrapperCore.dll"/> 
    <Payload SourceFile="..\VerySimpleBurnApp\bin\Release\Microsoft.Deployment.WindowsInstaller.dll"/> 
</BootstrapperApplicationRef> 

而且VerySimpleBurnApp.BootstrapperCore.config 编辑引导程序的应用程序:更新到当前

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <configSections> 
    <sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore"> 
     <section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" /> 
    </sectionGroup> 
    </configSections> 
    <startup useLegacyV2RuntimeActivationPolicy="true"> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> 
    </startup> 
    <wix.bootstrapper> 
    <host assemblyName="VerySimpleBurnApp"> 
     <supportedFramework version="v4.5" /> 
    </host> 
    </wix.bootstrapper> 
</configuration> 
+0

请提供您的BA的Bundle.wxs(特别是BootstrapperApplicationRef元素),BootstrapperCore.config和目标.NET Framework版本。 –

+0

0x80070490似乎意味着'元素未找到',如果这有助于任何事情。 ('net helpmsg 1168' - 十六进制0490的十进制 - 并且原始网页搜索似乎同意。) –

+0

您的BA的目标框架是什么?它是4.5.1还是4.5.2或4.6? –

回答

2

对于.NET 4.5中,supportedRuntime元素需要看起来像这样:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> 

而且,似乎supportedFramework元素不支持.NET 4.5,他们需要被删除。

+0

谢谢你,但我仍然得到同样的错误。 –

+0

在我的情况下,配置文件没有被包含,但问题和你的答案让我解决了这个问题。 –