Ignore subdirectory of wix heat output file using XSL

690 views Asked by At

I have got a Folder "MyProject" which I harvest using heat using HeatDirectory etc. in Visual Studio. "MyProject" contains a .git folder which I want to ignore/exclude but it is not possible yet based on my research here and on google without using XSL transformation.

Can someone please provide me with an working XSL example on how to ignore MyProject.git and all files/directories inside .git?

1

There are 1 answers

0
sceiler On BEST ANSWER

Workaround/solution: Use the pre and post build event of visual studio to just move .git (local git repository) out of directory to be harvested and move it back after you are done.

Pre-build:

xcopy "<PathToDirWithGit>.git" "<PathWhereToMoveGit>.git" /E /H /R /X /Y /I /K
rd "<PathToDirWithGit>.git" /S /Q

xcopy will move everything and rd will then delete the original directory, so the "move" is complet.

Post-build: Just reverse pre-build:

xcopy "<PathWhereToMoveGit>.git" "<PathToDirWithGit>.git" /E /H /R /X /Y /I /K
rd "<PathWhereToMoveGit>.git" /S /Q

Done.