2010-02-03 5 views
1

논리 섹션을 조각 * .wxs 파일로 분리하고 있는데 Votive 및 Visual Studio를 사용하여 주 Product.wxs에 어떻게 포함합니까? 주 wxs 파일에서 구성 요소를 참조하지만 수신 및 오류로 인해 구성 요소를 찾을 수 없습니다. 내가 올바르게 연결하지 않았다고 가정합니다.WSX 파일 조각 포함

Error 13 Unresolved reference to symbol 'Component:RegistryEntries' in section 'Product:{A5CA93A2-91B2-46CA-B681-07451DCCCDCB}'. 

<ComponentRef Id="RegistryEntries"/> 

RegistrySettings.wxs

<?xml version="1.0" encoding="UTF-8" ?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
<?include $(sys.CURRENTDIR)\Config.wxi?> 

<!-- Registry entries --> 
<Fragment Id="RegistrySettings"> 
<DirectoryRef Id="TARGETDIR"> 
    <Component Id="RegistryEntries" Guid="{MY-GUID}"> 

    <!-- Create registry keys and grant user rights --> 
    <!-- Add Registry Keys and default values as necessary --> 
    <RegistryKey Root="HKLM" Key="$(var.RegKey)" Action="create"> 
     <Permission User="$(var.DefaultUser)" GenericAll="yes" ChangePermission="yes"/> 
    </RegistryKey> 

    <!-- Connection Info registry keys and values --> 
    <RegistryKey Root="HKLM" Key="$(var.ConnectionRegKey)" Action="create"> 
     <Permission User="$(var.DefaultUser)" GenericAll="yes" ChangePermission="yes" /> 

     <!-- Main Connection settings --> 
     <RegistryValue Name="SoapURL" Value="$(var.DefaultSoapUrl)" Type="string"/> 
    </RegistryKey> 
    ... 

    </Component> 
</DirectoryRef> 
</Fragment> 
</Wix> 

Product.wxs

<?xml version="1.0" encoding="UTF-8" ?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> 

<!-- Use pre-processor variable to include other wix variable definitions/components --> 
<?include $(sys.CURRENTDIR)\Config.wxi?> 

<Product Id="a5ca93a2-91b2-46ca-b681-07451dcccdcb" 
     Name="$(var.ProductName)" 
     Language="1033" 
     Version="$(var.ProductVersion)" 
     Manufacturer="$(var.ProductManufacturer)" 
     UpgradeCode="$(var.UpgradeCode)"> 

<Package InstallerVersion="200" Compressed="yes" Keywords='Installer' Description="App Installer" 
    Languages='1033' SummaryCodepage='1252' /> 

<!-- Define custom variables for icons and license files --> 
<WixVariable Id="WixUILicenseRtf" Value="docs\liscensing.rtf" /> 
<WixVariable Id="WixUIBannerBmp" Value="images\fplogo1.bmp" /> 
<WixVariable Id="WixUIDialogBmp" Value="images\fp-setup.bmp" /> 

<!-- Add Install conditions such as .Net version required and privileges --> 
<PropertyRef Id="NETFRAMEWORK35_SP_LEVEL"/> 
<Condition Message="This application requires .NET Framework 3.5 SP1. Please install the .NET Framework then run this installer again."> 
    <![CDATA[Installed OR (NETFRAMEWORK35_SP_LEVEL and NOT NETFRAMEWORK35_SP_LEVEL = "#0")]]> 
</Condition> 

<Condition Message="You need to be an administrator to install this product."> 
    Privileged 
</Condition> 

<Media Id="1" Cabinet="My.cab" EmbedCab="yes" /> 

<!-- Default to installing for all users/everyone --> 
<Property Id="ALLUSERS">1</Property> 


<!-- Win64="$(var.Win64)" --> 
<Property Id="INSTALLDIR"> 
    <RegistrySearch Id="RegistrySearch" Type="raw" Root="HKLM" 
      Key="Software\[Manufacturer]\[ProductName]" Name="InstallLocation" /> 
</Property> 

<!-- Add Remove Programs properties --> 
<Property Id="ARPPRODUCTICON" Value="MyIcon.exe" /> 
<Property Id="ARPHELPLINK" Value="$(var.ArpHelpUrl)" /> 

<!-- Base Install Directory - Define Directory Structures --> 
<Directory Id="TARGETDIR" Name="SourceDir"> 
    <Directory Id="ProgramFilesFolder"> 
    <Directory Id="APPLICATIONFOLDER" Name="MyWix"> 
     <Directory Id="ArchDir" Name="$(var.ArchDir)" /> 
     <Directory Id="LogDir" Name="$(var.LogDir)" /> 
     <Directory Id="TempDir" Name="$(var.TempDir)" /> 
    </Directory> 
    </Directory> 

    <Directory Id="ProgramMenuFolder" Name="Programs"> 
    <Directory Id="ApplicationProgramsDir" Name="MyWix" /> 
    </Directory> 

    <Directory Id="DesktopFolder" Name="Desktop" /> 
</Directory> 

<!-- Application Directory and Structure--> 
<DirectoryRef Id="APPLICATIONFOLDER"> 
    <Component Id="My.exe" Guid="MYGUID"> 
    <File Id="My.exe.file" Name="$(var.Project.TargetFileName)" 
      Source="$(var.Project.TargetPath)" DiskId="1" KeyPath="yes" Vital="yes"> 
    </File> 
    </Component> 
</DirectoryRef > 



<!-- Features to install, these could include the main exe, help docs, and scanner components --> 
<Feature Id="Complete" Title="Product" Description="The complete package" 
     Display="expand" Level="1" ConfigurableDirectory="APPLICATIONFOLDER"> 
    <Feature Id="MainApplication" Title="Installer Wix" Level="1"> 
    <ComponentRef Id="My.exe"/> 
    <ComponentRef Id="RegistryEntries"/> 
    <ComponentRef Id="ApplicationStartMenuShortCut" /> 
    </Feature> 
</Feature> 
</Product> 
</Wix> 
+0

모든 * .wxs 파일을 프로젝트에 포함하기 만하면됩니다. 올바른 ID로 구성 요소를 참조하고 있는지, ComponentGroup이 아닌지를 확인하고 있습니까? –

+0

그것이 내가 추측하고 있었던 것이다. 내 * .wxs 파일은 모두 프로젝트에 있습니다. 내가 게시 한 wxs 파일 조각을보십시오. 구성 요소 그룹이 없습니다. –

답변

1

신경 쓰지 새로운 .wxs는 비주얼 스튜디오 2008에서 파일을 내가 만든 후 내가이 연결되지 않은 몇 가지 이유 아마도 원래 .wxi 파일로 생성 되었기 때문일 수 있습니다.

필자는 파일을 제외하고 다시 포함 시켰으며, 깨끗한 상태로 만들고 빌드하고 작동했습니다.