Fichiers PDB et GAC ( ou comment qualifier plus simplement une anomalie)
Un petit lien, tout public, rappelant comment utiliser les fichiers PDB pour donner plus de sens a une StackTrace lorsqu’une exception survient sur une assembly publiée en Release 🙂
- Install the assembly to the GAC. There are a few ways of doing this. First, create a WSP file which installs the assembly to the GAC. Second, you can use gacutil.exe to install it.
- Select Start – Run and type in %SYSTEMROOT%AssemblyGAC_MSILor \[your server name]c$windowsassembly (is administrative shares are enabled)
- Open the folder which contains the DLL.
- Open the folder with the version number and public key you are interested in.
- Open Visual Studio 2005 or Visual Studio 2008.
- In the Solution Explorer, right-click on the solution and select Properties.
- On the Build tab, set the Output Path to the folder which contains the DLL (the folder in step #4).
- Build the project. This will copy in the PDB file to the GAC folder.
- Select Debug-Attach to Process.
- Select the correct w3wp process. To know the correct w3wp process, see this post.
- Set breakpoints accordingly.
- Execute code by activating/deactivating the feature in browser.
This bypasses the windows explorer shell special handling for this folder, and allows you to copy and paste files as normal without using GACUTIL.
In the GAC_MSIL subfolder, find the subfolder corresponding to the name of your assembly. Below there will be one or more version subfolders. Find the latests version subfolder., and copy your timer job dll and pdb file (built in debug mode!) to this folder.