I was wondering if it's possible to include some sub-folder on publication, of an excluded folder. Let's assume i have this structure:
/Folder1/
/Folder1/FileX
/Folder1/FileY
/Folder1/SubFolder1/
/Folder1/SubFolder2/
What i want is to exclude the whole Folder1 content, but include only a specific set of sub-folder (in my example SubFolder1).
The Folder1 folder is excluded with the ExcludeFoldersFromDeployment in the .pubxml:
<ExcludeFoldersFromDeployment>Folder1</ExcludeFoldersFromDeployment>
You haven't told us what this .pubxml file is, so there is a limit to what we can help you with.
But in general:
The construct that deals with files and folders in MSBuild is Items. You want an Item here, not an MSBuild property.
So you could easily use an item to point to a specific sub folder in your build environment like this:
You can then do anything you want with that Item. You could copy the files in it somewhere else, or anything else with them.
The files are accessed later by using
@(DeployThese)