This project is read-only.
2

Resolved

Error when adding ListItemEventReceiver from dialogue

description

When adding ListItemEventReceiver code from the UI (as a sideissue it is a little strange that I have to click on the featureeventreceiver ... button to add the .cs file for listitemeventreceiver) SPVisualDev throws an error which says that the class have to inherit from SPFeatureReceiver but when I click OK it still has added the correct file and the correct featurereceiver is still shown in the xml (as it should be). Could you have a look at this?

file attachments

comments

tore7506 wrote Dec 1, 2009 at 8:56 PM

You can add any typ of files in the code file selector but only feature receiver classes will be accepted when selecting and clicking 'OK'. If you want to add a item receiver then you should do it in the element section for that specific list template or content type. You can of course also add event receivers outside the feature editor but you will have to select the file in the feature editor to bind it to the feature or element after.

A revision has been made in version 2.1.3 which fixes the issue if the file doesn.t inherit from correct SharPoint base class directly. Now it can inherit form any base class that in turn inherits from for example FeatureEventReceiver in the inheritance chain.

wrote Feb 14, 2013 at 1:23 AM

wrote May 16, 2013 at 6:08 AM

wrote May 16, 2013 at 6:08 AM

wrote Jun 14, 2013 at 8:51 AM