2017-09-12 9 views
0

WCFクライアントからビルドおよびテスト(CMD Installutillからインストール)できるWCFサービスがあります。今私はwixインストーラプロジェクトを作成して、同じWCFサービスのexeファイルを作成します。以下は、私が使用しているWIXコードです:WCFウィンドウサービスのWIXインストーラ

<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> 

WIX出力exeファイルのパッケージには(Windowsサービスとして)正常にインストールされ、自動的に開始されました。その後、同じWCFテストクライアントを使ってテストすると、サービスが実行されていないことがわかります。答えは以下の

答えて

0

私はジョーからWIXコミュニティからそれを得た:

インストールプログラムがTestWCFService.exe.Configを探していましたが、我々は別の拡張子名TestWCFService.Configで同じファイルを展開していました。

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

関連する問題