2017-09-12 4 views
0

J'ai un service WCF que je peux créer et tester (installer à partir de CMD Installutill) à partir du client WCF avec succès. Maintenant, j'ai créé un projet d'installation wix pour créer un exe pour le même service WCF. Voici le code WIX j'ai utilisé:Programme d'installation WIX pour le service Windows WCF

<Fragment> 
<ComponentGroup Id="ProductComponents" Directory="TestWCFService"> 
    <Component Id="TestWCFService.exe" Guid="F071A592-33A9-44DA-A81B-AD4AC8195757"> 
    <File Id="TestWCFService.exe" Source="$(var.TestWCFService.TargetDir)TestWCFService.exe" KeyPath="yes" Vital="yes" DiskId="1"/> 
    <ServiceInstall 
     Id="TestWCFService" 
     Name="TestWCFService" 
     Account="LocalSystem" 
     Start="auto" 
     Interactive="no" 
     Type="ownProcess" 
     Vital="yes" 
     ErrorControl="critical" /> 
    <ServiceControl Id="TestWCFService" Name="TestWCFService" Start="install" Stop="both" Remove="both" Wait="yes" /> 
    </Component> 
    <Component Id ="TestWCFService.Config" > 
    <File Name="TestWCFService.Config" Source = "$(var.TestWCFService.TargetDir)TestWCFService.exe.Config" /> 
    </Component> 
    <File Name="TestUtilities.dll" Source= "$(var.TestWCFService.TargetDir)TestUtilities.dll" /> 
    </Component> 
    <Component Id="NLog.dll"> 
    <File Name="NLog.dll" Source= "$(var.TestWCFService.TargetDir)NLog.dll" /> 
    </Component> 
</ComponentGroup> 

package WIX sortie exe sera installé avec succès (comme service Windows) et auto a commencé. Après cela, lorsque je teste en utilisant le même client de test WCF, je ne vois pas le service en cours d'exécution.

Répondre

0

Après réponse que je l'ai obtenu de la communauté Wix De Joe:

Programme installé cherchait TestWCFService.exe.Config mais nous avions déployé même fichier avec un nom différent de l'extension TestWCFService.Config.

<Component Id ="TestWCFService.Config" > 
<File Name="**TestWCFService.Config**" Source = "$(var.TestWCFService.TargetDir)**TestWCFService.exe.Config**" />