views:

626

answers:

2

Hi,

I'm trying to create copy/zip a pre-compiled site which is contains empty folders(after pre-compilation). Looks like empty folders is not included to the list of items after CreateItem task. How I can care of empty folders?

thanks

+2  A: 

Hi

I don't feel that this is the most elegant solution, but what we have done before is, creating a folder in the solution, and a text file called placeholder.txt or something similar, and the setting the properties of the text file to be included in the build. The result is a folder where you want it containing a file that you don't want. We then delete the placeholder.txt file before we zip it up, all within the build script.

Not elegant but it does the job for our scenario.

Rihan Meij
+2  A: 

Hi,

MSBuild will not pick up empty folders when creating items. You will have to use a task (like the FindUnder task from the MSBuild Extension Pack) if you want to be able to place empty folders into an item.

Sayed Ibrahim Hashimi