ON deploying from TFS 2015 to onpremise Server,it deletes empty folders in App Data Folder.I want to include the empty folders in AppData and set Read,write/full control permissions to that folder.I use WINRM IIS Web Deployment task.
1 Answers
This is how the feature has been designed. Take a look from our MSFT'S reply at this similar question: Publish Artifacts task does not copy up empty folders
I can confirm this is by design. I am assuming you are uploading artifacts to Azure DevOps Service rather than to your own file share. You should think of Azure DevOps Service's artifact storage more like blob storage than a giant file share.
I see you say you need these empty directories at deployment time. Can you create them as a step during the release rather than as a step during the build? I would say that fits best with the build vs. release abstraction.
Compressing all of your artifacts into a .zip before you copy them to the artifact staging directory should also work. You will just have to unzip them as part of the release.
As suggested, you can create the empty folders via a script to workaround the issue. It will also apply to the situation if you choose to publish to file share path. Besides, you could also zip the artifact and upload and unzip it during release.

- 49,478
- 5
- 35
- 62