I need to develop and deploy an event receiver
(A) to a specific document library
<1> and another event receiver
(B) to another specific email-enabled document library
<2>; both document libraries reside in the same SharePoint website (see image which is sketchy at best!!).
This is a MOSS 2007 environment, by the way, and I am using Visual Studio 2008 with WSPBuilder. I would like to do the following and I would like to know if it is feasible
- Set up a single Visual Studio solution that will contain the implementation for the two event receivers.
- A single feature must be installed and used to simultaneously enable (or disable) both event receivers.
- Upon activating the feature, bind event receiver
<1>to document library
(A), and bind event receiver
<2>to document library
(B). Conversely, when deactivating the feature, unbind the event receivers from the corresponding document libraries.
What is the best approach to implementing the above, and am I deviating from best practices with this type of packaging? My goal is not about convenience; it is necessary for both event receivers to be functional. If the event receivers were implemented as separate features, it is possible (user error) that one feature is activated while the other is not.