Unresolved reference to symbol 'WixComponentGroup:MyWebWebComponents' in section
Asked Answered
M

1

6

I was following the below code which is product.wxs files.But I am facing an error as below:

Error 5 Unresolved reference to symbol 'WixComponentGroup:MyWebWebComponents' in section 'Product:{}'

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

  <Product Id="702881b5-9a64-4ab8-ab47-f3babcd950a2"
          Name="WixApplication" Language="1033"
          Version="1.0.0.0"
          Manufacturer="HexWireless"
          UpgradeCode="42b7872b-78c8-4a0b-abcd-28a30c9804ab">

    <Package InstallerVersion="200" Compressed="yes"  Platform="x64" InstallScope="perMachine"/>

    <!--<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />-->

    <!--Find the Path to the sqlcmd.exe by performing a registry search. This is hardcoded for SQL 2012.
      Change 110 to 100 for 2008. Might need to change the script too.-->
    <Property Id="SQLBINDIR">
      <RegistrySearch Id="SqlBinDir"
        Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\ClientSetup"
        Name="Path"
        Type="raw"
        Win64="yes"/>
    </Property>

    <Condition Message="Microsoft SQL Server 2012 needs to be installed before this installer can run">
      <![CDATA[SQLBINDIR]]>
    </Condition>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="INSTALLLOCATION" Name="Database">
        <Component Id="Database" Guid="a8dc2Fcd-087d-e393-b059-c67877e51b8a">
          <File Id="DatabaseScript" Source="SQLScripts\HexWireless.sql"/>
          <RemoveFile Id ="RemoveInstall.log" Name="Install.log" On="uninstall" />
        </Component>
      </Directory>

      <Directory Id="INSTALLDIR" Name="PFiles">
        <Directory Id="WixService" Name="Service">

            <Component Id="WixWindowsServiceComponent" DiskId="1" Guid="6f51c0f3-776c-4aec-a200-1f199352c6c3" Win64="yes">
              <File Id="WixService.exe" Name="WixService.exe" Source="$(var.WixService.TargetDir)\WixService.exe"/>
              <ServiceInstall Id="InstallWixService" DisplayName="WixService" Name="WixService.exe" Description="WixService" Account="NT Authority\Network Service" ErrorControl="normal" Start="demand" Type="ownProcess" Vital="yes" />
              <ServiceControl Id="ControlWixService" Name="WixService.exe" Stop="uninstall" Remove="uninstall" />
            </Component>
        </Directory>
      </Directory>

      <Directory Id="INSTALLFOLDER" Name="Publish">
      </Directory>

    </Directory>

    <Feature Id="ProductFeature" Title="WebApplication" Level="1">
      <Feature Id="Database" Title="Database" Description="DatabaseScript" Level="1" Display="expand"
               AllowAdvertise="no" ConfigurableDirectory="INSTALLLOCATION" Absent="allow">

        <Feature Id="WixWindowsServiceComponent" Title="Service" Description="WixService" Level="1" Display="expand"
              AllowAdvertise="no" ConfigurableDirectory="INSTALLDIR" Absent="allow">

          <ComponentGroupRef Id="WixWebsiteIssConfiguration" />
          <ComponentRef Id="Database"/>
          <ComponentRef Id="WixWindowsServiceComponent"/>
          <ComponentGroupRef Id="MyWebWebComponents"/>
        </Feature>
      </Feature>
    </Feature>

    <Property Id="INSTALLDIR" Value="D:" />
    <Media Id="1" Cabinet="WixWindowsServiceComponent.cab" EmbedCab="yes" />

    <InstallExecuteSequence>

      <!--If the database feature is selected these actions will run to install the DB-->
      <Custom Action="Database.cmd" After="InstallFiles" >
        <![CDATA[NOT Installed]]>
      </Custom>

      <!--Ensure this runs after the custom action to set up the properties for its cmd line-->
      <Custom Action="Database" After="Database.cmd">
        <![CDATA[NOT Installed]]>
      </Custom>

    </InstallExecuteSequence>

    <UI>
      <UIRef Id="GUI"/>
      <UIRef Id="WixUI_ErrorProgressText" />
    </UI>


    <!--This is the sequence script. Best way to understand this is by running sqlcmd -?
          Use "property" Custom action to get variable substitution working-->
    <CustomAction Id="Database.cmd"  Property="Database"
  Value="&quot;[SQLBINDIR]sqlcmd.exe&quot; -E -S &quot;[SQLSERVER]&quot; -i &quot;[#DatabaseScript]&quot; -o &quot;[INSTALLLOCATION]HexWireless.log&quot;"/>

    <!-- Note that the cmd line and args will come from a property with the same name as the custom action, this has been set by the custom action above -->
    <CustomAction Id="Database"  BinaryKey="WixCA"   DllEntry="CAQuietExec"   Return="check"   Execute="deferred"   Impersonate="yes"  />

  </Product>
</Wix>

Thanks In Advance.

Markhor answered 8/6, 2016 at 10:28 Comment(3)
If you have a <ComponentGroup Id="MyWebWebComponents" somewhere in your code, you need to ensure it is in the project and is part of the build. Otherwise, you could delete the <ComponentGroupRef Id="MyWebWebComponents" />.Pyorrhea
@@Tom Blodget , It is in the project(we can see in two different files such as product.wxs and setup.build) and if i removed <ComponentGroupRef Id="MyWebWebComponents" /> then how can we get web content of web application which is located in publish folder.Markhor
My guess is that there's some problem with the file which includes the MyWebWebComponents fragment ... Could you list what files are in your project folder, and perhaps show at least part of the fragment?Blowzy
M
3

I am not sure if your issue is sorted or not, I just faced the same issue even though i have created a few of these msi files with Wix.

In my case, it wasn't finding the "HeatedComponents" that I am generating automatically within the project. I had to load this file into the project, (these files or folders may be inside your project folder but in most cases VS does not load them automatically).

You have to Right Click on the project -> Add -> Existing Item; and select the file/item that is required.

Maidy answered 27/4, 2020 at 12:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.