Publish Profile App_Data recursive inclusion and deletion behavior
0 reputation · 28 Nov 2022, 09:43 UTC
Web Publish File Management
Visual Studio publish profiles provide options to manage the target directory state and specific folder inclusions. When the Delete all existing files prior to publish option is enabled, the MSBuild process is intended to purge the destination before copying new assets.
Concurrent with this, the Include all files in the App_Data folder setting is used to ensure application data is migrated to the remote server. However, there is uncertainty regarding how these two settings interact when the App_Data folder contains a nested directory structure.
It is unclear if the deletion policy recursively removes all sub-directories within App_Data before the inclusion policy triggers a recursive copy of the same nested files. Current logs at the Information level do not explicitly distinguish between files skipped by the include set and files removed by the purge operation.
- Does the
Delete all existing filessetting recursively purge nested sub-folders withinApp_Data? - Is the
Include all files in the App_Data folderoperation recursive for all nested levels, or limited to the top-level directory?