Remove the Full Path of a PDB File in a DLL

Hello,

Does anyone know how to remove the full path of a PDB file from a C# dll or exe file?

I noticed that the full path where my project is stored in my computer shows up whenever a debug error shows up. We do not install the PDB files anyway, but we keep them in case we need to debug a crash dump. So there's no need to hard code the exact location of them in my computer in the dll file.

I even changed the project configuration mode from Debug to Release and the pdb path is still there.  Is there any way to get rid of it?

Thanks.

T.
TheUndeciderAsked:
Who is Participating?
 
Chinmay PatelEnterprise ArchitectCommented:
You could disable PDB file generation for Release mode

Go to Project Properties -> Build -> Select Release -> (On bottom right you )Advanced...->Debug Info-> None
0
 
BuggyCoderCommented:
i would always have my published code running on production server.

Next i would delete the pdb files manually....
0
 
Chinmay PatelEnterprise ArchitectCommented:
Also Please note that, when you leave PDF file with your assembly it gets loaded anyways and it adds a small performance impact.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.