2016-04-08 9 views
0

Ich habe ein Exe-Installationsprogramm mit Wix Bootstrap-Installer erstellt. Wenn ich auf das Installationsprogramm klicke, um es zu installieren, wird immer das Dialogfeld aufgefordert, das nicht-net-Framework zu installieren. Aber ich habe bereits dieses dot net Framework. Wenn ich auf Install klicke, passiert nichts, alles schließt sich.Installer mit Wix bootstrap UI erstellt immer versucht, dot net framework zu installieren, obwohl es existiert

Unten ist meine Klasse, die BootstrapperApplication erweitert.

public class CustomBootstrapperApplication : BootstrapperApplication 
{ 
    public static Dispatcher Dispatcher { get; set; } 
    protected override void Run() 
    { 
     Dispatcher = Dispatcher.CurrentDispatcher; 
     var model = new BootstrapperApplicationModel(this); 
     var viewModel = new InstallViewModel(model); 
     var view = new InstallView(viewModel); 
     model.SetWindowHandle(view); 
     this.Engine.Detect(); 
     view.Show(); 
     Dispatcher.Run(); 
     this.Engine.Quit(model.FinalResult); 
    } 
} 

Unten ist mein AssemblyInfo.cs

using System.Reflection; 
using System.Runtime.CompilerServices; 
using System.Runtime.InteropServices; 
using CustomBA; 
using Microsoft.Tools.WindowsInstallerXml.Bootstrapper; 

// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information 
// associated with an assembly. 
[assembly: AssemblyTitle("CustomBA")] 
[assembly: AssemblyDescription("")] 
[assembly: AssemblyConfiguration("")] 
[assembly: AssemblyCompany("")] 
[assembly: AssemblyProduct("CustomBA")] 
[assembly: AssemblyCopyright("Copyright © 2016")] 
[assembly: AssemblyTrademark("")] 
[assembly: AssemblyCulture("")] 

// Setting ComVisible to false makes the types in this assembly not visible 
// to COM components. If you need to access a type in this assembly from 
// COM, set the ComVisible attribute to true on that type. 
[assembly: ComVisible(false)] 

// The following GUID is for the ID of the typelib if this project is exposed to COM 
[assembly: Guid("0640182b-2d21-4f58-ad2a-7a4efc1d5d94")] 

// Version information for an assembly consists of the following four values: 
// 
//  Major Version 
//  Minor Version 
//  Build Number 
//  Revision 
// 
// You can specify all the values or you can default the Build and Revision Numbers 
// by using the '*' as shown below: 
// [assembly: AssemblyVersion("1.0.*")] 
[assembly: AssemblyVersion("1.0.0.0")] 
[assembly: AssemblyFileVersion("1.0.0.0")] 

[assembly: BootstrapperApplication(
typeof(CustomBootstrapperApplication))] 

Unten ist meine BootstrapCore.config Datei

<?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.5" /> 
    </startup> 
    <wix.bootstrapper> 
    <host assemblyName="CustomBA" /> 
    </wix.bootstrapper> 
</configuration> 

ich dieses Projekt als Abhängigkeit zu meinem Bootstrap-Projekt hinzugefügt. Im Folgenden finden Sie die Product.wxs des Bootstrap-Projekts.

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" > 
    <Bundle Name="MyBootstrapper" Version="1.0.0.0" Manufacturer="WiX Tests" UpgradeCode="416b6bbf-2beb-4187-9f83-cdb764db2840"> 
    <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost"> 
     <Payload SourceFile="$(var.CustomBA.TargetDir)CustomBA.dll" /> 
     <Payload SourceFile= "$(var.CustomBA.TargetDir)BootstrapperCore.config" /> 
     <Payload SourceFile= "$(var.CustomBA.TargetDir)BootstrapperCore.xml" /> 
     <Payload SourceFile= "$(var.CustomBA.TargetDir)Microsoft.Practices.Prism.Mvvm.Desktop.dll" /> 
    <Payload SourceFile= "$(var.CustomBA.TargetDir)Microsoft.Practices.Prism.Mvvm.dll" /> 
    <Payload SourceFile= "$(var.CustomBA.TargetDir)Microsoft.Practices.Prism.SharedInterfaces.dll" /> 
    </BootstrapperApplicationRef> 
    <WixVariable Id="WixMbaPrereqLicenseUrl" Value=""/> 
    <WixVariable Id="WixMbaPrereqPackageId" Value=""/> 
    <Chain> 
    <MsiPackage Id="Myapp" SourceFile="Lib\MyInstaller.msi" Compressed="yes" Vital="yes" /> 
    </Chain> 
    </Bundle> 
</Wix> 

Warum bekomme ich dieses Problem? Ich habe dot net 4.5 installiert. Bitte um Rat.

Antwort

2

In BootstrapperCore.config, Ihr supportedRuntime Element den falschen Wert für v4.5 hat, braucht es

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