TFS Find related files with OR

So, I want to find all the .xml and .pdb files and delete them from the build output folder. I can do it at a time, but can I do it as soon as I find the matching files.

+5
source share
1 answer

If you do this as part of the TFS build process template, you need several actions and a variable. I will do my best to tell you about it.

  • Create a Sequence somewhere after the build is complete - I placed mine right after the files were copied to Drop Location.
  • Create a variable with Sequence with matchedFilestype nameIEnumerable<String>
  • FindMatchingFiles
    • MatchPattern: String.Format("{0}\**\*.xml;{0}\**\*.pdb", BuildDetail.DropLocation). , BinariesDirectory, Drop Drop.
    • : matchedFiles
  • ForEach :
    • : String.
    • Foreach file matchedFiles
    • InvokeMethod :
      • TargetType: System.IO.File
      • : Delete
      • : : In : String : file

, , XAML Visual Studio, InvokeMethod XAML:

mtbwt:BuildTrackingParticipant.Importance="None"
+20

All Articles