Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging in Visual Studio 2005 1

Status
Not open for further replies.

supermatchgame

Programmer
May 16, 2007
50
GB
I've written a c# class library and deployed it to Share Point 2007 as a web part. Now I'm trying to debug it. I've started the remote debugger on the server that MOSS2007 lives on and set a breakpoint on the code on my laptop, but the break point never gets hit.

I was reading about the PDB file that VS creates and the fact that this might not be deployed correctly; can someone clarify where I need to put said file on the remote server?
 
pdb's should go in the same directory as the exe.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Do you mean the .exe for the code or the .exe for the debugger? There's no .exe for the code (I don't think); it's just compiled as a DLL which is then GAC'd and referenced by MOSS2007 in its own special way.
 
i haven't used gac with any of my assemblies or executables. when I deploy I copy the necessary assemblies to the directory via VS05. if any pdb's are available they are copied as well.

I'm still 99% sure the pdb should be in the same directory as the assembly. (exe or dll). so where ever the physical file is located is where the pdb should be as well.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
So I guess that copying it to the GAC (i.e. c:\windows\assembly) is the right thing to do. Thanks!
 
Copying the pdb file into the GAC is not quite as simple as you impled. If you use the command prompt you can actualy see the directry structure under the assembly directory.

Your dll will be in a directory somewhere along the lines of the following. The pdb file needs to go in that directory.

"C:\WINDOWS\assembly\<GACSection>\<Assembly Name>\<Assembly Version>__<Public Key Token>"

<GACSection> There are multiple directories at this level in the GAC the one you want is most likly GAC_MSIL

<Assembly Name> Name of your assembly as it shows up in the GAC List when opening C:\WINDOWS\assembly from windows explorer.

<Assembly Version> Version of your assembly as it shows up in the GAC List when opening C:\WINDOWS\assembly from windows explorer.

<Public Key Token> Public Key of your assembly as it shows up in the GAC List when opening C:\WINDOWS\assembly from windows explorer.


Hope this helps.

-Sean
 
Thanks - no one else who has posted on this subject has gone into this level of detail.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top