I have an Empty SharePoint solution where I added an EventReceiver that attempts to create a new Diagnostic category to my SharePoint farm. To test I am setting a breakpoint on the FeatureActivated method and F5 debugging but it is not hit. Am I using the wrong approach or missing a concept?

  • I'm confused. Is the feature not activating, or is your breakpoint not being hit, or both? Is the feature set to activate automatically upon deployment, or manually? – Tim Gabrhel Jun 1 '11 at 16:24
up vote 4 down vote accepted

If you mean EventReceiver for the feature then you need to attach to the VSSHost process of Visual Studio 2010 which is actually running the code on activation during an F5 deploy.

Another approach would be to set the solution to 'no activation' and then attach the debugger to the process after a F5, activate the feature, now it should hit the feature code.

  • Visual Studio 2010 bites the dust once again. I've lost track of how many failings it has. Thank heavens for CKS:Dev. – James Love Jun 1 '11 at 16:31

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.