Every time I try to deploy my project (containing only one Event Receiver), I get the following error:

Error occurred in deployment step 'Activate Features': Operation is not valid due to the current state of the object.

I simply restart Visual Studio and Redeploy and it works. But I have to do this everytime I want to deploy. What could be causing this issue?


1 Answer 1


If you deploy a web part for a farm and you try to activate it from the feature it will not work because you need to activate it from a site, you cannot do it a deployment time and it will give you an error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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