This question already has an answer here:

I have created an ItemAdded event receiver that is supposed to process new documents/files after they've been added to any document library in the farm - i.e., I'd like the event receiver to automatically monitor all document libraries across the farm, both already existing and those that will be created in the future.

The problem is, if I set the event receiver feature scope to "Farm", I get an error in VS2010 when I try to deploy:

The Project Item cannot be deployed through a Feature with Farm scope.

How can I deploy event receiver for the entire farm, if possible at all? (Because if it isn't possible, that pretty much renders the entire concept of event receivers useless to me...).

marked as duplicate by Eric Alexander Mar 26 '14 at 15:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @KarthikJaganathan I have seen this question, but I don't understand the solution, nor if it applies here? – w128 Mar 26 '14 at 10:27

The Event Receivers can only be Scope at Site or Web. http://msdn.microsoft.com/en-us/library/office/ms431081(v=office.14).aspx

I believe you would need to use a Feature Stapler.

For existing sites, you will need to activate the feature manually, either using the UI, or powershell loop that activates the feature everywhere.

Then you need a feature Stapler to add this feature to each site template, so that any future sites that will be created this feature will be activated on it.

Try reading my blog first before attempting to do a feature Stapler. http://cann0nf0dder.wordpress.com/2013/10/08/my-feature-stapler-doesnt-work-what-to-do/

  • Thank you, so this seems to be the only way... Do you perhaps know why Event Receivers are limited to Site/Web scope? It seems a very arbitrary design decision to me. – w128 Mar 26 '14 at 10:31
  • Unfortunately I don't know why it's only Site/Web scoped. It could be because you can only deploy lists/libraries templates and instances at Site/Web scopes. msdn.microsoft.com/en-us/library/ms469947.aspx – Cann0nF0dder Mar 26 '14 at 10:33

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