Before I give you the solution for this issue, I would suggest you to not deploy using this steps in production. I would suggest you to use the approach for pilot version with very limited number of user. Because, pdb file is nothing but “Program DataBase” which has your code with additional attribute and details which help us to get the debug information.
The full version of pdb file will contain the debug information which will tell the JIT Compiler that debug information is available in the PDB file. So, this version is not suitable for production environment.
So, we have another version called pdb-only, which is almost same as full version without debug information. So, with pdbonly version, you can get complete stacktrace detail. Even for that, the compilation of the build must have done with “Enable Optimizations” unchecked.
Steps:
1. Right click on all the projects in the solution and click on properties.
2. Go to, Compile tab.
3. Select Configuration as “Release”.
4. Click on “Advanced Compile Option” button at the bottom.
5. Uncheck “Enable Optimizations”
6. Select “pdb-only” option from the dropdown for “Generate debug info”
7. Click OK.
8. Now build the application and deploy pdb files with the exe and all your dll files.