Reputation: 459
Either there's something I don't understand about WiX or the single greatest coincidence in history is happening over-and-over-and-over.
I have a <Component/>
element. In this component I assign the GUID as an asterisk..... like ya do.
<Component Id="Component_PowershellDLL"
Guid="*">
<File Source="$(var.MyProject.ProjectDir)System.Management.Automation.dll"/>
</Component>
(I know I should use Nuget to access this DLL, but that's another story...)
When I compile, I get this error message:
Component/@Id='Component_PowershellDLL' has a @Guid value'{guid-here}' that duplicates another component in this package.
The DLL in the component is used elsewhere in the project, but the only place that it lives is in the "MyProject" folder (hence, the (var.MyProject.ProjectDir)
).
I don't get the error when I get rid of the star and just put in a regular old Guid.
Can anyone shed some light on this? I was under the impression that when a star is used, it simply generates a new Guid. So how can the Guid that it's generating be somewhere else in the project?
I see. I do keep the DLL that the component installs in the same solution (MyProject
in the example shown).
So, yes, the DLL that is referenced in the Component via a macros lives in the Visual Studio solution.
I suppose if they had different GUIDs (the DLL that lives in another project and the GUID that I put in the component that installs said DLL), then Windows Installer would have two GUIDs for the same... thing.
Thanks, y'all. You guys are a true help in my foray into the world of Windows Installer.
@PhileDW I have your book sitting right beside me, but I haven't had time to really get into it yet.
Upvotes: 2
Views: 3072
Reputation: 20790
WiX generates guids based on the path to the file, not completely randomly. The most likely explanation is that you've got that identical path somewhere else in your setup.
Upvotes: 7