Visual Studio requires the program database (.pdb) files to find the debugging information of any assembly. Now to debug assemblies in GAC we can either :
- Create a symbol server and put all the pdb files there and configure visual studio to use it.
- Or else we can copy the .pdb files to the global assemble cache folder.
Now the c:\windows\assembly folder is not the real folder where the files are stored, it is just a virtual folder. To get to the real folder, we need to do the following:
Click: Start -> RunThis will open the real GAC folder where the files are saved. Now go 1 level up :
Type: %systemroot%\assembly\gac [ENTER]
Go inside the folder [GAC_MSIL]. Find the folder [assembly Name] \ [assembly version in format of #.#.#.#]__[assembly public key token].
Open the folder and you would be able to see your assembly. Now copy the PDB file to that folder and then attach the debugger and enjoy debugging . . . !!