[wix-users] Unable to assign Auto Generated GUID for Component ID for Empty Folder
venh.123 at gmail.com
Tue Apr 12 09:02:40 PDT 2022
Thanks a lot Edwin. But, I wanted to harvest an empty folder and be able to
auto generate the component guid.
On Tue, Apr 12, 2022 at 4:04 AM Edwin Castro <egcastr at gmail.com> wrote:
> Consider not harvesting the empty directory and adding an authored
> component instead.
> <DirectoryRef Id="MYFOLDER">
> <Directory Id="LogsFolder" Name="Logs" />
> <Component Id="CmpLogsFolder" Guid="ENTER_REAL_GUID_HERE"
> <CreateFolder />
> Then make sure to add an appropriate ComponentRef to your Feature.
> <Feature ...>
> <ComponentRef Id="CmpLogsFolder" />
> <ComponentGroupRef Id="MyCompGroup" />
> 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
>> 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
>> 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
More information about the wix-users