Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Debug assemblies running from the GAC

  Asked By: Thaddeus    Date: Feb 20    Category: Sharepoint    Views: 1719

Does anyone know how to debug assemblies running from the GAC? The
following option looked promising but it didn't work for me...

To debug a DLL running from the GAC (like a Document Library Event Sink)
specify the symbol path for the dll as follows:
1. Start VS.NET
2. Open the Solution Explorer window (CTRL+ALT+L)
3. Right-click the solution (not the project), and click Properties
4. Expand Common Properties and choose the Debug Symbol Files node
5. Add the path for the symbols file by clicking the icon of a folder
with the gleam
6. Set your breakpoint(s)
7. Automatically/manually attach to the process running the code


I also found this which is compelling in and of itself but, I've not had
time to try it out so I don't know if it would allow me to debug:

Share: 

 

7 Answers Found

 
Answer #1    Answered By: Brooks Bond     Answered On: Feb 20

Did you do the debugging DLLs running  from GAC?.. I am also facing same problem?

 
Answer #2    Answered By: Gregg Wilkinson     Answered On: Feb 20

I don't remember. However, I was successful but I may have
resorted to dumping the DLL into the \bin. I seems like it just started
working (weak I know).

 
Answer #3    Answered By: Darrel Sexton     Answered On: Feb 20

I have not tried yet.. but I have got a link which tells about how to
debug the webpart asseblies installed on GAC.

I just wanted to share these along with you guys.

stup.org/blogs/nidhogg/archive/2004/08/18/355.aspx

 
Answer #4    Answered By: Tory Sellers     Answered On: Feb 20

It is possible to install the assemblies  on the GAC using STSADM.EXE
tool itself. no need to use GACUTIL.exe. Only thing we need to
concentrate for the complex webpart is we need to write
publickeytocken in manifest.xml file(cab file  purpose... deployment
time) which is taking care of writing the assembly with publickeytoken
in the portal site web.config file. Before run the portal site. make
sure that you have made IISRESET.

It works perfectly fine. Anybody tried and facing problem, let me
know. I have various ways to solve this issue.

 
Answer #5    Answered By: Agustin Miranda     Answered On: Feb 20

The manifest.xml file  does NOT need to have the public key token to mark
the dll  as a SafeControl in the web.config.

Also, deploying a CAB using the AddWpPack operation of STSADM does NOT
require an iisreset.

 
Answer #6    Answered By: Arron Middleton     Answered On: Feb 20

Menifest.xml does not require publicTokenkey. With this we
gain some benifit we need not write the publictokenkey to web.config
file. manifest.xml file  is taking care of writing the safecontrol
entry to web.config file. if it is from GAC publickeytoken is entered.
if the assembly is in bin it writes * .

 
Answer #7    Answered By: Vance Hardin     Answered On: Feb 20

I agree, you should rarely ever key the SafeControl entry into the
web.config.

However, you also do not need to put your public key token into the
manifest.xml to get the SafeControl entry into the web.config.

If you sign your AssemblyInfo file  with a strong name key (snk), STSADM
will extract the proper public key token from the DLL in the CAB and
insert the SafeControl entry into the web.config.

So, we should not manually put the public key token anywhere in the
manifest.xml file. That said, I do teach that we should fully qualify
the assembly (including the public key token) in the DWP file so that
global deployments to the GAC go smoothly.

 
Didn't find what you were looking for? Find more on Debug assemblies running from the GAC Or get search suggestion and latest updates.




Tagged: