[wix-users] error LGHT0091: Duplicate symbol

Ian Bell ib at ianbellsoftware.com
Mon Apr 25 09:48:56 PDT 2016


Hello Farrukh,

 

Thanks for letting me know the attached was not included.    The WIX markup is included below.   The error is generated for duplicate source code filenames, even though the directory paths are different.   

 

 

<?xml version="1.0" encoding="UTF-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

                <Product Id="*" 

                                                                                 Version="1.0.0.0" 

                                                                                 Name="WixInstaller" 

                                                                                 Language="1033" 

                                                                                 Manufacturer="My Company Name" 

                                                                                 UpgradeCode="{288B0815-CABF-40E4-9DBB-08DEAFB2D36D}">

                                

                                <Package InstallerVersion="301" 

                                                                                                 Compressed="yes"

                                                                                                InstallScope="perMachine"

                                                                                                InstallPrivileges="elevated"

                                                                                                Description="Installs the [ProductName] program"

                                                                                                Manufacturer="My Company Name"

                                                                                                Comments="My comment"/>

 

 

                                <Condition Message="This application is only supported on Windows Vista or higher.">

                                                <![CDATA[Installed OR (VersionNT >= 601)]]>

                                </Condition>

                                

                                <MediaTemplate EmbedCab="yes" />

                                <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

 

                                <Directory Id="TARGETDIR" Name="SourceDir">

                                                <Directory Id="ProgramFilesFolder">

                                                                <Directory Id="MyCompanyNameDirectoryId" Name="MyCompanyName" >

                                                                                <Directory Id="MyProjADirectoryId"  Name="ProjA"/>

                                                                                <Directory Id="MyProjBDirectoryId"  Name="ProjB"/>

                                                                </Directory>

                                                </Directory>

                                </Directory>

 

                                <!--

                                                Project A files

                                -->

                                <ComponentGroup Id="ProjAComponentGroupId" Directory="MyProjADirectoryId">

                                                

                                                <Component Id="ProjAComponentId_File01" Guid="{BAB628EF-196D-4944-9140-4C4EE206C139}">

                                                                <File Source="$(var.ProjA.ProjectDir)main.cpp" Name="main.cpp" />

                                                </Component>

 

                                                <Component Id="ProjAComponentId_File02" Guid="{AB59F389-1177-43AE-955F-C5DF538AD3AC}">

                                                                <File Source="$(var.ProjA.ProjectDir)main.h" Name="main.h" />

                                                </Component>

 

                                                <Component Id="ProjAComponentId_File03" Guid="{3CB35750-A5DD-4373-9656-37A7651B962E}">

                                                                <File Source="$(var.ProjA.ProjectDir)Resource.h" />

                                                </Component>

 

                                                <Component Id="ProjAComponentId_File04" Guid="{D3A11428-2B04-4F0C-B68D-B4E8E086A930}">

                                                                <File Source="$(var.ProjA.ProjectDir)stdafx.cpp" />

                                                </Component>

 

                                                <Component Id="ProjAComponentId_File05" Guid="{DDB7DE16-70BA-4FE0-8F5A-9071291917E3}">

                                                                <File Source="$(var.ProjA.ProjectDir)stdafx.h" />

                                                </Component>

                                </ComponentGroup>

 

                                <!--

                                                Project B files

                                -->

                                <ComponentGroup Id="ProjBComponentGroupId" Directory="MyProjBDirectoryId">

                                                

                                                <Component Id="ProjBComponentId_File01" Guid="{293D2C62-4A6A-496C-9C82-63BBE934343F}">

                                                                <File Source="$(var.ProjB.ProjectDir)main.cpp" Name="main.cpp"/>

                                                </Component>

 

                                                <Component Id="ProjBComponentId_File02" Guid="{ED878B60-EB95-4D62-AAB2-3BDDC641D43B}">

                                                                <File Source="$(var.ProjB.ProjectDir)main.h" Name="main.h"/>

                                                </Component>

 

                                                <Component Id="ProjBComponentId_File03" Guid="{015D7916-53C3-4BE9-86F6-6617F77E1E49}">

                                                                <File Source="$(var.ProjB.ProjectDir)Resource.h" />

                                                </Component>

 

                                                <Component Id="ProjBComponentId_File04" Guid="{3526D1CC-FDF2-46A7-9F67-EE12BAA2657A}">

                                                                <File Source="$(var.ProjB.ProjectDir)stdafx.cpp" />

                                                </Component>

 

                                                <Component Id="ProjBComponentId_File05" Guid="{44BFC964-9806-450B-83DB-C2153C3E69B6}">

                                                                <File Source="$(var.ProjB.ProjectDir)stdafx.h" />

                                                </Component>

                                </ComponentGroup>

 

                                <Feature Id="ProductFeatureId" Title="My Feature Title">

                                                <ComponentGroupRef Id="ProjAComponentGroupId"/>

                                                <ComponentGroupRef Id="ProjBComponentGroupId"/>

                                </Feature>

                </Product>

</Wix>

 

From: Farrukh Waheed [mailto:farrukh1 at gmail.com] 
Sent: April 25, 2016 01:33
To: ib at ianbellsoftware.com; WiX Toolset Users Mailing List
Subject: Re: [wix-users] error LGHT0091: Duplicate symbol

 

I didn't find the zip file. However from log, it seems that you have added some files more than one times using same Component IDs (or may be File Ids). For example, main.cpp's Component at line 41 is also present at line 61. Please check Component definition where it says "Location of symbol related to previous error.".

Can you please share only Product.wxs?

 

On 25 April 2016 at 09:50, Ian Bell <ib at ianbellsoftware.com> wrote:

I have not been able to resolve a "error LGHT0091: Duplicate symbol" error
message that has been plaguing me for 2 days and I am hoping to find some
help here.



The attached ZIP file contains a small Visual Studio 2010 solution which can
be used to replicate the problem.   The sample VS2010 solution includes two
C++ projects and a WIX installer.    The two C++ projects contain
identically named source files (e.g. main.cpp, main.h, stdafx.cpp,
stdafx.h).   Attempting to build a WIX project with non-unique source code
filenames (i.e. their filepaths differ but the filenames are the same)
generates error messages similar to 'error LGHT0091: Duplicate symbol
found'.   The complete error message generated for the sample solution is
included at the end of this email message.   Google lists only handful of
posts which cite the LGHT0091 and LGHT0092 error numbers and these refer to
GUI related problems - something my WIX installer avoids.



One solution is to provide unique source code filenames between projects -
but this is a very impractical, particularly for files with common Visual
Studio generated filenames names such as 'stdafx.cpp', 'stdafx.h',
'resource.h', etc.



So my question is has anyone encountered the problem before and found a
solution?   I would appreciate any suggestions you might have.



ThanX



Ian



















1>------ Build started: Project: WixInstaller, Configuration: Debug x86
------

1>            C:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe
-dDebug -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\\" -d"SolutionDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\\" -dSolutionExt=.sln
-dSolutionFileName=testWixError.sln -dSolutionName=testWixError
-d"SolutionPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\testWixError.sln" -dConfiguration=Debug
-dOutDir=bin\Debug\ -dPlatform=x86
-d"ProjectDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\\" -dProjectExt=.wixproj
-dProjectFileName=WixInstaller.wixproj -dProjectName=WixInstaller
-d"ProjectPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\WixInstaller.wixproj"
-d"TargetDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\bin\Debug\\" -dTargetExt=.msi
-dTargetFileName=WixInstaller.msi -dTargetName=WixInstaller
-d"TargetPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\bin\Debug\WixInstaller.msi"
-dProjA.Configuration=Debug -d"ProjA.FullConfiguration=Debug|Win32"
-dProjA.Platform=Win32 -d"ProjA.ProjectDir=e:\Users\admin\Documents\Visual
Studio 2010\Projects\testWixError\ProjA\\" -dProjA.ProjectExt=.vcxproj
-dProjA.ProjectFileName=ProjA.vcxproj -dProjA.ProjectName=ProjA
-d"ProjA.ProjectPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\ProjA\ProjA.vcxproj"
-d"ProjA.TargetDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\Debug\\" -dProjA.TargetExt=.exe
-dProjA.TargetFileName=ProjA.exe -dProjA.TargetName=ProjA
-d"ProjA.TargetPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\Debug\ProjA.exe" -dProjB.Configuration=Debug
-d"ProjB.FullConfiguration=Debug|Win32" -dProjB.Platform=Win32
-d"ProjB.ProjectDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\ProjB\\" -dProjB.ProjectExt=.vcxproj
-dProjB.ProjectFileName=ProjB.vcxproj -dProjB.ProjectName=ProjB
-d"ProjB.ProjectPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\ProjB\ProjB.vcxproj"
-d"ProjB.TargetDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\Debug\\" -dProjB.TargetExt=.exe
-dProjB.TargetFileName=ProjB.exe -dProjB.TargetName=ProjB
-d"ProjB.TargetPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\Debug\ProjB.exe" -out obj\Debug\ -arch x86
Product.wxs

1>            C:\Program Files (x86)\WiX Toolset v3.10\bin\Light.exe -out
"e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\bin\Debug\WixInstaller.msi" -pdbout
"e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\bin\Debug\WixInstaller.wixpdb"
-cultures:null -contentsfile
obj\Debug\WixInstaller.wixproj.BindContentsFileListnull.txt -outputsfile
obj\Debug\WixInstaller.wixproj.BindOutputsFileListnull.txt -builtoutputsfile
obj\Debug\WixInstaller.wixproj.BindBuiltOutputsFileListnull.txt
-wixprojectfile "e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\WixInstaller.wixproj"
obj\Debug\Product.wixobj

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(41,0): error LGHT0091:
Duplicate symbol 'File:main.cpp' 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.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(67,0): error LGHT0092:
Location of symbol related to previous error.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(45,0): error LGHT0091:
Duplicate symbol 'File:main.h' 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.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(71,0): error LGHT0092:
Location of symbol related to previous error.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(49,0): error LGHT0091:
Duplicate symbol 'File:Resource.h' 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.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(75,0): error LGHT0092:
Location of symbol related to previous error.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(53,0): error LGHT0091:
Duplicate symbol 'File:stdafx.cpp' 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.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(79,0): error LGHT0092:
Location of symbol related to previous error.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(57,0): error LGHT0091:
Duplicate symbol 'File:stdafx.h' 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.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(83,0): error LGHT0092:
Location of symbol related to previous error.

1>Done building project "WixInstaller.wixproj" -- FAILED.

1>

========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========






____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

 




More information about the wix-users mailing list