2016-06-05 3 views
1

저는 Wix에 익숙하지 않습니다. Visual Studio 2012에서 Wix 3.10을 사용하여 Windows 서비스 설치 패키지를 작성하려고하는데 dll 외부 참조를 추가 할 수 없습니다.Wix가 설치 폴더에 외부 dll을 추가합니다.

필자는 필자가 참조로 설치하려는 Windwos 서비스 인 프로젝트를 가지고 있습니다. 그리고 ParodosService.Setup은 내 설치 프로젝트입니다. :

<?xml version="1.0" encoding="UTF-8"?> 
<!-- The name of the product --> 
<?define Name = "Vision Service" ?> 
<!-- The manufacturer, for setup package publisher and folder info --> 
<?define Manufacturer = "MyCompany" ?> 
<!-- The version number of this setup package--> 
<?define Version = "1.0.1" ?> 
<!-- UpgradeCode must be unique and not changed once the first version of the program is installed. --> 
<?define UpgradeCode = "{1240E0CD-B3D2-44A7-B064-11B3C0709D69}" ?> 

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Product Id="*" Name="$(var.Name)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)" Version="$(var.Version)" Language="1033"> 
    <!-- Create a folder inside Talk Sharp called Test Service --> 
    <Package InstallerVersion="300" Compressed="yes"/> 
    <!-- Create a folder inside Talk Sharp called Test Service --> 
    <Media Id="1" Cabinet="ParodosService.cab" EmbedCab="yes" /> 
    <!-- Allow upgrades and prevent downgrades --> 
    <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." /> 
    <!-- Define the directory structure --> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder"> 
     <!-- Create a folder inside program files called Talk Sharp --> 
     <Directory Id="ROOTDIRECTORY" Name="$(var.Manufacturer)"> 
      <!-- Create a folder inside Talk Sharp called Test Service --> 
      <Directory Id="INSTALLFOLDER" Name="$(var.Name)" /> 
     </Directory> 
     </Directory> 
    </Directory> 

    <ComponentGroup Id="DllsComponent" Directory="INSTALLFOLDER" Source="C:\Users\Pasquale\Documents\Visual Studio 2012\Projects\ParodosService\ParodosService\bin\Release">  
     <Component Id="EntityFramework.dll"> 
     <File Name="EntityFramework.dll" /> 
     </Component> 
     <Component Id="EntityFramework.SqlServer.dll"> 
     <File Name="EntityFramework.SqlServer.dll" /> 
     </Component>   
     <Component Id="ParodosService.exe.config"> 
     <File Name="ParodosService.exe.config" /> 
     </Component> 
    </ComponentGroup> 
    <!-- The files inside this DirectoryRef are linked to the Test Service directory via INSTALLFOLDER --> 
    <DirectoryRef Id="INSTALLFOLDER"> 
     <!-- Create a single component which is the ParodosService.exe file --> 
     <Component Id="$(var.ParodosService.TargetFileName)"> 
     <!-- Copies the ParodosService.exe file using the project reference preprocessor variables --> 
     <File Id="$(var.ParodosService.TargetFileName)" Source="$(var.ParodosService.TargetPath)" KeyPath="yes" /> 
     <!-- Remove all files from the INSTALLFOLDER on uninstall --> 
     <RemoveFile Id="ALLFILES" Name="*.*" On="both" /> 
     <!-- Tell WiX to install the Service --> 
     <ServiceInstall Id="ServiceInstaller" 
         Type="ownProcess" 
         Name="ParodosService" 
         DisplayName="$(var.Name)" 
         Description="A Test Service that logs dummy text on an interval to a text file." 
         Start="auto" 
         ErrorControl="normal" /> 
     <!-- Tell WiX to start the Service --> 
     <ServiceControl Id="StartService" Start="install" Stop="both" remove="uninstall" Name="ParodosService" Wait="yes" /> 
     </Component> 
    </DirectoryRef> 
    <!-- Tell WiX to install the files --> 
    <Feature Id="MainApplication" Title="Main Application" Level="1"> 
     <ComponentRef Id="$(var.ParodosService.TargetFileName)" /> 
    </Feature> 
    </Product> 
</Wix> 

내가 수동으로 난 내 Windows 서비스의 소 instalation 폴더에 필요한 세 개의 파일을 지정하는 ComponentGroup에 세 가지 구성 요소를 추가 :

여기 ParodosService.Setup 프로젝트에서 내 .wxs 파일입니다. 수동 수정의이 종류는 각 추가 파일에 대해 나에게 하나의 오류를 반환

ICE21: Component: 'EntityFramework.dll' does not belong to any Feature. 

내가 WIX 새로운 해요, 난 너무 heat.exe으로이 작업을 수행하는 데 문제가 있고, 나는 이것이를했다 문질러서 더 쉬운 방법이지만, 두 가지 모두 오류를 낳습니다 ...

+0

전체 절대 경로를 넣어보다 출력 폴더를 지정하는 간단한 방법이있다 :

난 당신이처럼 기능 정의를 변경하는 경우, 그것은 작동합니다, 생각합니다. 당신은'를 사용할 수 있습니다. –

답변

3

오류 메시지는 구성 요소가 고아이고 기능에 속해야 함을 나타냅니다.

<Feature Id="MainApplication" Title="Main Application" Level="1"> 
     <ComponentRef Id="$(var.ParodosService.TargetFileName)" /> 
     <ComponentGroupRef Id="DllsComponent"/> 
</Feature> 
+0

네, 이제 완벽하게 작동합니다! – pasluc74669

관련 문제