Search code examples
.nettfsdebug-symbols

How to exclude indexing & publishing a symbile file on TFS2015


My project needs to index and publish the .pdb files. But one of the .pdb file from the Autofac NuGet package is not compatible with our TFS builder. So I think I can exclude it.

But I am struggling with the search pattern syntax. The "Search pattern" textbox on TFS 2015 is a single line textbox, and I could not find the right way to define multiple search pattern.

I have tried:

  1. **\bin\**\*.pdb - the system reports 13 files, but got error when trying to index Autofac.pdb.
  2. **\bin\**\*.pdb !**\Autofac.pdb - the system reports 0 symbol found.
  3. **\bin\**\*.pdb;!**\Autofac.pdb - the system seems to ignore the part behind ';'.
  4. **\bin\**\*.pdb;-:**\Autofac.pdb - the system reports 9 files, no error has been reported.

My questions are:

  1. What is the correct syntax to include multiple search patterns?
  2. How to get a list of symbol files that have been indexed and published?

Solution

  • For the search pattern (rooted at the path supplied in the previous input) used to discover pdbs that contain symbols which will follow file matching patterns reference.

    About exclude patterns :

    • Leading ! changes the meaning of an include pattern to exclude. You can include a pattern, exclude a subset of it, and then re-include a subset of that: this is known as an "interleaved" pattern.
    • Multiple ! flips the meaning.
    • You must define an include pattern before an exclude one.

    For task version2, we usually directly wrap lines to exclude Autofac.pdb , such as

    enter image description here

    However, in your case seems you are still using version1 of the task which use the pattern that was used by the 1.x Agent's Powershell SDK.

    Then you should use the old format: **/bin/**/*.pdb;-:**\Autofac.pdb the last one you used.

    "-:" indicates an exclude pattern. Separate multiple patterns using ;

    More details please refer this link.


    How to get a list of symbol files that have been indexed and published.

    You could directly remote to the build server which hold those files and manually check it.