MSBuild syntax for deleting files/directories and reporting what was deleted
- by Maslow
Vs2010 .net 4.0 targeted project if that affects the answers at all.
I want to delete the bin and obj directories and output a message for the path of what was deleted.
<Target Name="CleanOutputs" Condition="'$(MvcBuildViews)'=='true'">
<Message Text="Cleaning Outputs" Importance="high"/>
<RemoveDir Directories="$(OutputPath);obj" RemovedDirectories="@(removed)" />
<Message Text="Removed: %(removed.FullPath)" Importance="high"/>
<Message Text=" "/>
<!--<RemoveDir Directories="obj" />-->
<MakeDir Condition="!Exists('$(OutputPath)')" Directories="$(OutputPath)" />
</Target>
Is what I have, but the Removed: message never shows.