Search code examples
.net-coretfstfsbuild.net-core-3.1

Publishing symbols with TFS (2018) failed while indexing the source files of .net core 3.1 project


running the task "Index Sources & Publish Symbols", using on-premises TFS 2018, with the following settings

Path to publish symbols: \\myFileshareServer\symbols
Search pattern: **/*.pdb
Path to symbols folder: $(Build.SourcesDirectory)

TFS .NetCore Toolinstaller

BuildConfig

TFS Symbols step

I always get the following warning message for every pdb that is generated. (The project is build with .net core 3.1)

At least one source file for the symbol file xxx.pdb could not be indexed

The pdb files will be copied to the fileshare, but the warning messages, that no file could be indexed is making me mad. On an other project with .net 4.7.2 with the same steps, all is working fine.

I also tried

<DebugType>full</DebugType>

and

<DebugType>pdbonly</DebugType>

Nothing worked, always the same warning message. What do I have to do to get the files indexed? What could be the reason why all files can not be indexed?

Thanks a lot.

Publish Symbols log. (Sorry, I hope the german output of publish log is ok. Otherwise I need to contact my TFS admin :) )

2020-08-07T11:04:30.3983664Z ##[section]Starten: Pfad für Symbolveröffentlichung
2020-08-07T11:04:30.3987884Z ==============================================================================
2020-08-07T11:04:30.3988026Z Task         : Quellen indizieren und Symbole veröffentlichen
2020-08-07T11:04:30.3988318Z Description  : Indizieren Sie Ihren Quellcode, und veröffentlichen Sie Symbole für eine Dateifreigabe oder den Visual Studio Team Services-Symbolserver.
2020-08-07T11:04:30.3988634Z Version      : 2.0.7
2020-08-07T11:04:30.3988709Z Author       : Microsoft Corporation
2020-08-07T11:04:30.3989139Z Help         : Unter [Weitere Informationen](https://go.microsoft.com/fwlink/?LinkID=613722) erhalten Sie weitere Informationen zum Verwenden dieser Aufgabe. Visual Studio Team Services-Symbolserver befindet sich in der öffentlichen Vorschau. Lesen Sie [diese Anweisungen](https://go.microsoft.com/fwlink/?linkid=846265) zur Verwendung von Symbolserver in VSTS.
2020-08-07T11:04:30.3989566Z ==============================================================================
2020-08-07T11:04:32.0388621Z Es wurden 2 Dateien gefunden.
2020-08-07T11:04:33.6716180Z Mindestens eine Quelldatei für die Symboldatei "D:\Build\1\749\s\SpielProjekt\bin\Debug\netcoreapp3.1\SpielProjekt.pdb" kann nicht indiziert werden.
2020-08-07T11:04:33.8983354Z ##[command]"D:\Build\1\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.7\pdbstr.exe" -w -p:"D:\Build\1\749\s\SpielProjekt\bin\Debug\netcoreapp3.1\SpielProjekt.pdb" -i:"C:\Users\srv_tsfbuild_fdt02\AppData\Local\Temp\tmp19DD.tmp" -s:srcsrv
2020-08-07T11:04:33.9354219Z Mindestens eine Quelldatei für die Symboldatei "D:\Build\1\749\s\SpielProjekt\obj\Debug\netcoreapp3.1\SpielProjekt.pdb" kann nicht indiziert werden.
2020-08-07T11:04:33.9558971Z ##[command]"D:\Build\1\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.7\pdbstr.exe" -w -p:"D:\Build\1\749\s\SpielProjekt\obj\Debug\netcoreapp3.1\SpielProjekt.pdb" -i:"C:\Users\srv_tsfbuild_fdt02\AppData\Local\Temp\tmp1A1C.tmp" -s:srcsrv
2020-08-07T11:04:34.1041810Z ##[command]"D:\Build\1\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.7\symstore.exe" add /f "@C:\Users\srv_tsfbuild_fdt02\AppData\Local\Temp\tmp1A6B.tmp" /s "\\wkoe.wk.wknet\file\init_tae_symbols" /t "SpielwieseMarkus" /v "1.0.0.2"
2020-08-07T11:04:34.3481091Z ##[section]Async Command Start: Artefakt zuordnen
2020-08-07T11:04:34.3702107Z Das Artefakt 29552 wurde dem Build 17352 zugeordnet.
2020-08-07T11:04:34.3703184Z ##[section]Async Command End: Artefakt zuordnen
2020-08-07T11:04:34.3703816Z ##[section]Abschließen: Pfad für Symbolveröffentlichung

Solution

  • I tried a lot and found the "solution", that the messages of the tfs are false negative. All pdb files are, which could not be indexed, indexed correctly and I can step into all code, if I add the NuGet package to a project and debug it.

    For all who have the same problem: Check if the pdb files are generated. Try to debug into the external code and check the file, which is downloaded. It should have the correct commit ID in the file path.

    At least I disabled the warnings if a pdb could not be indexed and just generate the messages as "info" in the build.

    Kind regards