Total Pageviews

13 Dec 2012

Error : Object reference not set to an instance of an object on feature deployment

At the beginning of your FeatureActivated method, put this line of code :
System.Diagnostics.Debugger.Break();

Then, try to activate the feature. This will popup an "exception" window that let you to attach the debugger of your choice.
After attaching, your code will be pause at this line, and you will be able to walk into your code to find the issue.