Bisneto
Bisneto

Reputation: 133

How to stop generate pdb files in Release package

I'm trying to implement a CD/CI pipeline on TFS. I've created the build, and all the steps has been successfully, except Publish symbols path.

I'm receiving this error message:

2019-09-12T11:34:17.9788901Z ##[error]Indexed source information could not be retrieved from 'E:\buildAgent_work\96\s\Branch\Branche\Api\bin\AWSSDK.CognitoIdentity.pdb'. Symbol indexes could not be retrieved.

Anybody know how to fix this?

Thanks!

Upvotes: 1

Views: 2640

Answers (2)

Bisneto
Bisneto

Reputation: 133

I Fixed the problem. I had just to change to Release, instead of Debug. Thanks!

Upvotes: 1

Leo Liu
Leo Liu

Reputation: 76928

How to stop generate pdb files in Release package

This issue seems to be:

  • The default value for is portable - the new portable PDB.
  • TFS 2017 can't read the new portable PDB format.

Some possible workarounds for:

  • upgrade to TFS 2018
  • exclude AWSSDK.CognitoIdentity.pdb when publishing symbols
  • Build AWSSDK.CognitoIdentity from source and set the <DebugType>None</DebugType> in the project.

Since the AWSSDK.CognitoIdentity.pdb comes from the nuget package AWSSDK.CognitoIdentity, we could not use the following setting to disable PDB Generation:

<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>

So, we could update TFS to 2018 or exclude AWSSDK.CognitoIdentity.pdb when publishing symbols.

To exclude AWSSDK.CognitoIdentity.pdb when publishing symbols, we could use File matching patterns reference in the option Search pattern of Publish symbols path task:

**/bin/**/*.pdb
!**/bin/**/Microsoft.WindowsAzure.Storage.pdb

enter image description here

Hope this helps.

Upvotes: 0

Related Questions