wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

Duplicate symbol 'ChainPackageGroup:NetFx451Redist' found When Compiled Against v3.9 #4479

Closed wixbot closed 8 years ago

wixbot commented 10 years ago

When I compile my Bundle against the 3.9 release I observe

Error 26 Duplicate symbol 'ChainPackageGroup:NetFx451Redist' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique. C:\Dev\VS\DEV\Source\Installer\Bootstrapper\NetFx451.wxs 91 1 Bootstrapper

Compiling against 3.8 with the exact same files compiles without trouble. I am assuming this could be a bug hence I raise the issue here.

Bundle.wxs looks like

<Bundle Name="App" Version="$(var.ProductVersion)" Manufacturer="$(var.ProductManufacturer)" UpgradeCode="$(var.UpgradeCode)" IconSourceFile="..\Assets\Icons\v_icon.ico" SplashScreenSourceFile='SplashScreen.bmp' HelpUrl="www.effective-computing.com" AboutUrl="www.effective-computing.com" Copyright="(c) Effective Computing Ltd" Compressed="yes" UpdateUrl="www.effective-computing.com">

<WixVariable Id="WixMbaPrereqPackageId" Value="NetFx451Redist" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />
<WixVariable Id="WixStdbaLicenseUrl" Value="" /> 

<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
  <Payload SourceFile="..\WixBA\bin\x86\$(var.Configuration)\WixBA.dll"/>
  <Payload SourceFile="..\WixBA\WixBA.BootstrapperCore.config"
       Name="BootstrapperCore.config"/>
  <Payload SourceFile="..\..\Dependencies\SharedExternalDependencies\WiX\3.9\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
</BootstrapperApplicationRef>

<Variable Name='InstallFolder'
          Type='string'
          Value='[ProgramFilesFolder]TestFolder' />
<Variable Name="LaunchTarget" Value="[InstallFolder]\TestFolder\App.exe"/>
<util:RegistrySearch Id="PreviousInstallFolderSearch"
                     Root='HKLM'
                     Key='SOFTWARE\Effective Computing\TestFolder'
                     Value='InstallFolder'
                     Variable='PreviousInstallFolder' />
<util:DirectorySearch Path='[PreviousInstallFolder]'
                      Variable='InstallFolder'
                      After='PreviousInstallFolderSearch'
                      Condition='PreviousInstallFolder' />

<util:RegistrySearch Root='HKLM' Key='SOFTWARE\Microsoft\VisualStudio\10.0' Value='InstallDir' Variable='VS2010InstallFolder' />
<util:RegistrySearch Root='HKLM' Key='SOFTWARE\Microsoft\VisualStudio\11.0' Value='InstallDir' Variable='VS2012InstallFolder' />
<util:RegistrySearch Root='HKLM' Key='SOFTWARE\Microsoft\VisualStudio\12.0' Value='InstallDir' Variable='VS2013InstallFolder' />

    <util:RegistrySearch
        Id="NETFRAMEWORK45"
        Variable="NETFRAMEWORK45"
        Root="HKLM"
        Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
        Value="Release"
        Result="value" />

<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />

<Chain>
  <PackageGroupRef Id="NetFx451Redist" />
  <MsiPackage SourceFile="App.msi"
              Cache="yes"
              Visible="no"
              ></MsiPackage>
  <!--The remote execution application can be installed on Client or Server OS-->
  <MsiPackage SourceFile="Service.msi"
        Cache="yes"
        Visible="no"
              ></MsiPackage>
</Chain>

Then I have a file called NetFx451.wxs in the Bundle project that looks like

``` $(var.NetFx451WebLink) then re-run this installer.">NETFRAMEWORK45 ``` ``` ```

Originally opened by austin

wixbot commented 10 years ago

WiX v3.9 includes package groups for .NET 4.5.1 and .NET 4.5.2. The 4.5.1 redist package is named NetFx451Redist so it conflicts with the one you created.

Originally posted by barnson Resolution set to accepted Status changed from Untriaged to Resolved

wixbot commented 10 years ago

Thanks Bob,

This is still confusing me. Is this a documentation issue? All the older docs will refer to an older technique for including .net pre-reqs as part of a bundle. So likely that many folks running into this may get confused. I spent a few hours debugging and now have an installer that appears to work.

I had to comment out my RegistrySearch

    <!--<util:RegistrySearch
        Id="NETFRAMEWORK45"
        Variable="NETFRAMEWORK45"
        Root="HKLM"
        Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
        Value="Release"
        Result="value" />-->

and the PackageGroupRef in the Chain.

  <!--<PackageGroupRef Id="NetFx45Redist"/>-->

I also commented out

My Bootstrapper now builds and runs as expected but I am left wondering how it is locating and pulling in the required redistributables.

What if I specify NetFx45Web instead will this automatically pull down the web installer rather than the full installation package.

Anyway I appears I have something working just now so thanks for the pointer.

Originally posted by austin

wixbot commented 10 years ago

<PackageGroupRef Id="NetFx451Redist" /> is picking up the 4.5.1 redist that's included in WiX v3.9 but wasn't in v3.8.

Originally posted by barnson