Question

I am new to using WiX so this my be a dumb question. I am trying to keep the GUID generated by the harvest tool (heat.exe) consistent for files that I am packaging. Everyone seems to say that as long as the file path and sub path remain same heat.exe will generate the same GUID for a file. Unfortunately, I am not seeing that behavior. My workflow is as follows.

Copy all the deliverable files to a staging directory during my build process. Then run heat.exe in the staging directory to generate the component fragment wxs file. Before I copy the file into the staging directory I clear all my old files.

I want to add the generated wxs file into my source control so that I can achieve minor upgrades. If my understanding is correct for me to achieve that I need to have consistent GUID across my builds so that I can track them.

The command line I use for generating the wxs file is as follows:-

c:\foobar\build\>C:\win32\wix-3.7.1224.0\heat.exe dir . -cg MyCG -dr INSTALLDIR -g1 -gg -nologo -sreg -suid -t C:\foobar\src\support\packaging\wix\foo.xslt -var var.foobarSource -out c:\foobar\src\support\packaging\wix\foo.wxs

What I see that the GUID generated are different during each run. Is there was a way for me to keep GUID consistent.

Was it helpful?

Solution

You should specify -ag flag.

-ag
Auto generate component guids at compile time, e.g. set Guid="*".

As long as your file paths are the same, generated GUID's will be the same for files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top