We have the following PublishSymbols
task in our pipeline, and it's working correctly.
- task: PublishSymbols@2
inputs:
symbolsFolder: $(Pipeline.Workspace)/s/Server
searchPattern: "**/*.pdb"
indexSources: true
publishSymbols: true
symbolServerType: TeamServices
symbolsProduct: "ACM"
symbolsVersion: $(major).$(minor).$(revision)
symbolsArtifactName: "Symbols_ACM.$(major).$(minor).$(revision)_$(buildConfiguration)"
enabled: true
condition: eq(variables['doPublishSymbols'], 'true')
displayName: Create symbol table
However, we want to fine tune the searchPattern
input, so that it only looks for PDB files that begin with abc or xyz. How can I do this?
Comma-separated strings?
searchPattern: "**/abc*pdb", "**/xyz*pdb"
Array?
searchPattern: @("**/abc*pdb", "**/xyz*pdb")
Some kind of OR symbol?
searchPattern: "**/abc*pdb" | "**/xyz*pdb"
How about PowerShell newlines? From the source files on Github, I deduced that this might be the solution:
searchPattern: "**/abc*pdb`n**/xyz*pdb"
but this was the result:
Found 0 files.
##[warning]No files selected for indexing.
A RELATED QUESTION, DEALING WITH OTHER FILE TYPES:
My colleagues are suggesting that I include the EXE or DLL files associated with the PDB files, so the searchPattern will also include "abc*exe", "abc*dll", and so on. Does PublishSymbols
need these additional files? Or do the PDB files contain all of the information required by the task?
I've researched symbols, symstore.exe, and symbol.exe on the Web, and I haven't found a good answer to this question yet.
You could specify multiple search patterns directly with newlines:
According to the document Publish symbols for debugging:
So, PublishSymbols need these additional files, those files should be contained in the corresponding nuget package instead of in the Symbols package.