My goal here is to create a list template with code-behind on my server and copy it to a completely different Sharepoint server. The problem is that my server has Visual Studio 2010 while the other server does not, which makes adding code-behind to the other server's Sharepoint sites a bit of a challenge.
I created a custom list using SharePoint Designer 2010 in a new blank site collection. Basic list, nothing special. Then I used the Site Actions -> Save Site As Template to create a .wsp file so I could use Visual Studio 2010 to import the list. This way I could make some changes to the Schema.xml and add an event receiver for the itemAdding event. After the changes I deployed it back the site and it worked exactly how I wanted it to work.
On my site I went to my list then used List Settings to save the list as a template. At the List Template Gallery, I selected my template, and used the Documents -> Download A Copy to make a copy in my downloads folder. Then I created a new site collection using Central Administration. At this new site I went to it's List Template Gallery and uploaded my template from my downloads folder. I created a new list from this template and it's code-behind worked perfectly.
Now I have copied the template from my downloads folder to the other server, went to its site's List Template Gallery and uploaded my template. I created a new list from the template and it's code-behind for itemAdding does not work at all. The list looks like it should with the changes to the Schema.xml but the code-behind does not work.
What have I missed?