Link to home
Start Free TrialLog in
Avatar of Howard Bash
Howard BashFlag for United States of America

asked on

SharePoint 2016 Creating an Event Receiver Issue with Event Sources

Running Visual Studio 2015 on a SharePoint 2016 dev server.  I want to create an event receiver.  I create a SharePoint 2016 empty project (Farm) and then click add new item.  I select event receiver and the drop down to select the event source does not show any of my lists or libraries.

I have run as on the Visual Studio 2015 IDE as farm admin and still not luck.

Is this a broken VS or is there a rights issue or...?

Please advise.
Avatar of Piotr Strycharz
Piotr Strycharz
Flag of Poland image

Some possible reasons:

  • You did not install feature that contains your list definitions
  • Your lists use build-in templates

You may however manually change Elements.xml in you event receiver definition to match your list template ID. This should be enough for the correct installation.
Avatar of Howard Bash

ASKER

I created a list using the out of the box custom list template and added a column or two.  What feature might be required?  Also,  I would think using a built in template (like custom list) should work by default.
ASKER CERTIFIED SOLUTION
Avatar of Piotr Strycharz
Piotr Strycharz
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The list was created from an out of the box template using SharePoint, not code.  When I launch VS,  I don't see my list.   Shouldn't I see any list/library I create from the out of the box templates listed when I add the event receiver and must specify the event source?
Also,  where is the List Template ID?  Is it the list id I see in SPD?