2015-09-08 69 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

在我的情況下,配置文件沒有被包含,但問題和你的答案讓我解決了這個問題。 –