Everything SharePoint/Silverlight/WP7

My continuous learning of SharePoint, Silverlight, WP7 Development, Office, VSTO, C#…

Archive for January 2nd, 2008

Debugging Assemblies Located in the GAC

Posted by Steve Pietrek on January 2, 2008

Update: Please see this post for a better alternative.

I have been creating feature receivers which I installed to the GAC. Of course I ran into issues and needed to debug the code. Below are the steps I ran through to do so:

  1. 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.
  2. Select Start – Run and type in %SYSTEMROOT%\Assembly\GAC_MSIL
  3. Open the folder which contains the DLL.
  4. Open the folder with the version number and public key you are interested in.
  5. Open Visual Studio 2005 or Visual Studio 2008.
  6. In the Solution Explorer, right-click on the solution and select Properties.
  7. On the Build tab, set the Output Path to the folder which contains the DLL (the folder in step #4).
  8. Build the project. This will copy in the PDB file to the GAC folder.
  9. Select Debug-Attach to Process.
  10. Select the correct w3wp process. To know the correct w3wp process, see this post.
  11. Set breakpoints accordingly.
  12. Execute code by activating/deactivating the feature in browser.

Note: I need to do some more research on this but the breakpoints were not hit if I activated/deactivated the feature using STSADM. Breakpoints were only hit when I activated/deactivated the feature in the browser. Just something to be aware of.

Posted in SPDev | 3 Comments »

Links (1/2/2008)

Posted by Steve Pietrek on January 2, 2008

Happy New Year!

  1. Building Workflow Templates for SharePoint v3 Using Visual Studio 2008
  2. Moving to a new database server (or instance)
  3. What’s new in CRM 4.0 – Part 1
  4. What’s new in CRM 4.0 – Part 2
  5. Some More MOSS Gotchas
  6. Anonymous Access in SharePoint
  7. Creating a Custom Site Definition (Part 1)
  8. Creating a Custom Site Definition (Part 2)
  9. InfoPath 2007 / WCF Nasty Gotcha
  10. Top 5 Apps every Office developer should know
  11. Using Business Data Catalog Definition Editor
  12. SharePoint Event on List Creation
  13. WSS FAQ – additions and corrections – LXXXVI – 23rd – 29th December 2007
  14. Enable Workflow development in a class library project being used to create a WSSv3 Solution
  15. 7 Years of SharePoint – a History Lesson
  16. Performance Monitors for SharePoint
  17. Create a web part to show sites and sub-sites
  18. Team Development in a SharePoint Environment
  19. SharePoint: How to display blog feed using XML Web Part?

Posted in SPLinks | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.