[wix-users] Unable to assign Auto Generated GUID for Component ID for Empty Folder

Venkatesh H venh.123 at gmail.com
Mon Apr 11 05:01:15 PDT 2022

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

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

More information about the wix-users mailing list