I am learning WIX to build installer for my app but I am stuck with removing files. My question is how can I remove files and folders on uninstall. When I click on remove button, all the files and folders which the installer created doesn't remove on uninstall.
The answer is in the comments above but for future reference there are two things to check first when files are not being removed:
Ensure that you do not have Component/@Guid="". In Specifically setting to an empty string (Guid="") tells the Windows Installer ignore all the stuff built into this Component. Note: WiX v3.6+ you can leave the Guid attribute of the Component element completely and that is fine (a stable GUID will be generated).
Ensure the you do not have Component/@Permanent="yes". Obviously, that tells the Windows Installer to not uninstall the stuff.
来源:https://stackoverflow.com/questions/2012531/remove-file-and-folders-on-uninstall