0

I have created a web API in .net framework 6, when I build a project after changes, it generates a .dll file and .pdb file every time under C:\Users\User\Downloads\Demo.Api\Demo.Api\bin\Debug\net6.0

Xinran Shen
  • 8,416
  • 2
  • 3
  • 12
  • Related: https://stackoverflow.com/questions/11202083/whats-a-pdb-file – Hans Kesting Sep 06 '22 at 06:57
  • Because .pdb is a necessary file for debugging, here is some description from Microsoft : Program database (.pdb) files, also called symbol files, map identifiers and statements in your project's source code to corresponding identifiers and instructions in compiled apps. These mapping files link the debugger to your source code, which enables debugging – farshad fahimi Sep 06 '22 at 07:02
  • Does this answer your question? [What's a PDB file?](https://stackoverflow.com/questions/11202083/whats-a-pdb-file) – Maik Hasler Sep 06 '22 at 07:18
  • No, my question is whether the .pdb and .dll are created again and again or a single time. – Anil Thakur Sep 06 '22 at 08:32
  • 1
    every time you make a change and build the project , dll and pdb file will be generated. – CodingMytra Sep 06 '22 at 09:10
  • @Anil Thakur, When you change your code or rebuild the project, `pdb` and `dll` file will update. – Xinran Shen Sep 06 '22 at 09:25
  • A .dll and (optionally) .pdb are the expected results of a build action, so of course after a build they are recreated. Especially after changes to the code – Hans Kesting Sep 06 '22 at 11:07
  • thanks for clearing my doubt. – Anil Thakur Sep 07 '22 at 11:58

1 Answers1

0

Here is a Summary from MS Docs:

Why create a .pdb file

Program database (.pdb) files, also called symbol files, map identifiers and statements in your project's source code to corresponding identifiers and instructions in compiled apps. These mapping files link the debugger to your source code, which enables debugging.

More details you can refer to Docs,.NET's Portable PDB format

Xinran Shen
  • 8,416
  • 2
  • 3
  • 12