3

I am trying to include the PDB files so the Store will provide me with Stack Traces with line numbers along with crash reports.

I made sure to select in Build>Advanced>Debugging Information: pdb-only

Upon Build, the /bin/ has .pdb files.

Then on creating App Packages "Include full PDB symbol files" is selected:

PDB Symbols Checked

and in .csproj I already have

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DebugSymbols>True</DebugSymbols>
<Optimize>false</Optimize>

Once the packaging is done, if I open

AppPackages\PROG_Test\PROGUWP2_2.5.4.0_AnyCPU.appxbundle\PROGUWP2_2.5.4.0_AnyCPU.appx\

I can see all files except any of the .pdb.

EDIT: I have missed another archive within it with PROG2_2.5.4.0_AnyCPU.appxsym that contains PDB files only. I am not sure though why Store does not give the line numbers on crash

Daniel
  • 1,064
  • 2
  • 13
  • 30

2 Answers2

3

MSBuild by default removes all the pdb files during the generation of the appx.

In the "Microsoft Visual Studio\%Version%\Community\MSBuild\Microsoft\VisualStudio\%Version%\AppxPackage" folder, open "Microsoft.AppxPackage.Targets" and change the "AppxPackageIncludePrivateSymbols" value to "true".

<AppxPackageIncludePrivateSymbols Condition="'$(AppxPackageIncludePrivateSymbols)' == ''">true</AppxPackageIncludePrivateSymbols>

The pdb files will now appear in the appx (and of course the appxbundle).

Edit: Microsoft definitly doesn't want us to have pdb in appx, the files are removed for customers after the submission on the Store!

Javert
  • 248
  • 2
  • 7
  • 1
    I found this file at `C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage` and also needed to edit the file as administrator – JKennedy Apr 01 '21 at 11:03
  • I wish I could give 10 up votes. Been looking for the solution for a day now. Thank you!! Also, my path for VS 2022 is at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\AppxPackage – LawMan Feb 09 '22 at 16:43
-2

The .pdb file can be found here: "\bin[Platform]\Release\ilc\"

Mark W
  • 1,050
  • 7
  • 15
  • The pdb is already in \bin\ but they are not in that folder once it is packaged as ppxupload or .appxbundle. The \ilc\ does not exist there – Daniel May 15 '19 at 17:00
  • I get the pdb from the folder above for uploading to HockeyApp to symbolicate the exceptions. MS describes creating your own appxupload to ensure they are in there here https://learn.microsoft.com/en-us/windows/uwp/packaging/packaging-uwp-apps . It is under the "To create your app package upload file manually" – Mark W May 15 '19 at 19:34