2

Okay I think I'm missing something when I'm trying to build an Event Receiver. I'm new to this so please excuse my ignorance. But when I try to deploy an Event Receiver I always get a Could not load file or assembly 'TestDeployBlankER' error in ULS. I've created a blank ER to test this.

CODE

namespace TestDeployBlankER.EventReceiver1
{
    /// <summary>
    /// List Item Events
    /// </summary>
    public class EventReceiver1 : SPItemEventReceiver
    {
       /// <summary>
       /// An item is being deleted.
       /// </summary>
       public override void ItemDeleting(SPItemEventProperties properties)
       {
           base.ItemDeleting(properties);
       }


    }
}

ULS

Event manager error: Could not load file or assembly 'TestDeployBlankER, Version=1.0.0.0, Culture=neutral, PublicKeyToken=842fa6bb627ec365' or one of its dependencies. The system cannot find the file specified.

Event manager error: Could not load file or assembly 'TestDeployBlankER, Version=1.0.0.0, Culture=neutral, PublicKeyToken=842fa6bb627ec365' or one of its dependencies. The system cannot find the file specified.

I always get these when two errors one right after the other when I try to debug my solution. What am I missing here?

UPDATE

I also see these errors when I just try and do a deploy.

Solution Deployment : Looking for 'ReceiverAssembly' attribute in manifest root node for solution 'TestDeployBlankER.wsp'.

Solution Deployment : Looking for 'ReceiverClass' attribute in manifest root node for solution 'TestDeployBlankER.wsp'.

Solution Deployment : Missing one or more of the following attributes from the root node in solution TestDeployBlankER.wsp: assembly '', type ''.

I found this article talking about the feature Activate, Deactivation, Installation, Uninstalling, and Upgrading events. Am I supposed to implement soemthing for these events even on a simple ER?

4
  • You shouldn't need to implement anything for those. I did see a weird reference somewhere the if the base solution was an empty sharepoint project and not an event receiver project, it didn't work. What base project did you start from? Commented Feb 24, 2015 at 20:46
  • I used the event receiver template. Commented Feb 24, 2015 at 20:47
  • There is a server in the farm that is not configured. I think I read somewhere that could cause an issue. Could that be a culprit> Commented Feb 24, 2015 at 20:53
  • Looks like any solution uploaded to this farm is failing. Something must've gotten changed when we migrated data to 2013. Commented Feb 24, 2015 at 22:05

0

Your Answer

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