Skip to content

Commit a4d3a5a

Browse files
Mukul Sabharwalarunkm
authored andcommitted
Add Portable PDB check to short circuit Source Indexing (#4617)
1 parent a769403 commit a4d3a5a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Tasks/PublishSymbols/IndexHelpers/IndexFunctions.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ function Invoke-IndexSources {
4242
# continue
4343
#}
4444

45+
$bytes = Get-Content $symbolsFilePath -Encoding byte -TotalCount 4
46+
$data = [System.Text.Encoding]::ASCII.GetString($bytes)
47+
if ($data.equals("BSJB")) {
48+
Write-Verbose "Skipping: $symbolsFilePath because it is a Portable PDB"
49+
continue
50+
}
51+
4552
# Get the source file paths embedded in the symbols file.
4653
[string[]]$sourceFilePaths = Get-SourceFilePaths -SymbolsFilePath $symbolsFilePath -SourcesRootPath $provider.SourcesRootPath -TreatNotIndexedAsWarning:$TreatNotIndexedAsWarning
4754
if (!$sourceFilePaths.Count) {

0 commit comments

Comments
 (0)