int The number of build metadata directories successfully deleted.
Deletes the oldest builds in the build history so that no more than BuildHistory.BuildHistoryLimit remain.
If BuildHistory.BuildHistoryLimit is 0, or the current build count is at or below the limit,
no entries are removed and this method returns 0.
If a folder cannot be deleted (for example, due to a file lock or a permissions issue),
a warning is logged and the operation continues with the remaining entries.
Additional resources: BuildHistory.BuildHistoryLimit