I am having a nightmare trying to debug the event receiver of a Sharepoint list. This is the code of what I am doing:
//Add an event receiver to the list
list.EventReceivers.Add(SPEventReceiverType.ItemAdded, "DatasEvent, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 6f4db1e1fedbed57", "DatasEvent.DatasEventReceiver");
public override void ItemAdded(SPItemEventProperties properties)
{
try
{
int itemIdSql;
SPListItem item = properties.ListItem;
...
}
catch (SqlException ex)
{
Debug.WriteLine(ex.Message);
}
}
If I place a breakpoint in the event receiver it will not stop.