MSBuild should have an "easy" way to remove empty directories. By easy, it shouldn't require writing a PS1 or a new task dedicated to this job. Consider "folding" in the option to existing Delete Task or RemoveDir Task.
C# and thus Task has nice functionalty. https://stackoverflow.com/questions/2811509/c-sharp-remove-all-empty-subdirectories
Thanks
Felix
I think it'd be reasonable to add a OnlyEmptyDirectories parameter to RemoveDirectories.
Most helpful comment
I think it'd be reasonable to add a
OnlyEmptyDirectoriesparameter toRemoveDirectories.