[wix-users] Unable to assign Auto Generated GUID for Component ID for Empty Folder
Edwin Castro
egcastr at gmail.com
Mon Apr 11 15:34:20 PDT 2022
Consider not harvesting the empty directory and adding an authored
component instead.
<Fragment>
<DirectoryRef Id="MYFOLDER">
<Directory Id="LogsFolder" Name="Logs" />
</DirectoryRef>
<Component Id="CmpLogsFolder" Guid="ENTER_REAL_GUID_HERE"
Directory="LogsFolder>
<CreateFolder />
</Component>
</Fragment>
Then make sure to add an appropriate ComponentRef to your Feature.
<Feature ...>
<ComponentRef Id="CmpLogsFolder" />
<ComponentGroupRef Id="MyCompGroup" />
</Feature
--
Edwin G. Castro
On Mon, Apr 11, 2022 at 5:02 AM Venkatesh H via wix-users <
wix-users at lists.wixtoolset.org> wrote:
> In my Visual Studio Wix Project, I have a Heat command used to harvest a
> directory in PreBuild Event.
>
> *"%wix%bin\heat.exe" dir "%MyFolderPath%" -out
> "$(ProjectDir)Files\HeatOutput.wxs" -cg MyCompGroup -pog -gg -ag -g1 -ke
> -sfrag -sreg -srd -dr MYFOLDER*
>
> In my folder to harvest, I added an empty folder called Logs. Then when I
> ran the build, I got the following error.
>
>
>
> *The Component/@Guid attribute's value '*' is not valid for this component
> because it does not meet the criteria for having an automatically generated
> guid. Components using a Directory as a KeyPath or containing
> ODBCDataSource child elements cannot use an automatically generated guid.
> Make sure your component doesn't have a Directory as the KeyPath and move
> any ODBCDataSource child elements to components with explicit component
> guids.*
>
> So, can I not harvest an empty folder and have an auto generated Component
> ID? Please help me fix this.
>
> *Environment Details*
> Visual Studio 2019 Professional
> WiX Tool Set 3.11.2
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
More information about the wix-users
mailing list