0
votes

I have created a custom list in SharePoint 2010 programmatically. It works fine on my development machine when I deploy the project (that contains the list) to the SP site on my machine. I can see the list being deployed under lists. But when I package the whole solution and deploy the solution to test site on our test server on another machine the list seems to be missing on that sever (it does not exists under lists on that site).

There are some other custom lists within the project which are fine and are deployed properly but this one is not.

2
When are you creating the list? On some feature activation? Possibly your solution is deployed but the necessary feature is not activated.Nitin Rastogi

2 Answers

0
votes

I finally managed to fix this mystery to my relief!

The problem was the feature that was supposed to put the list on the SP server, did not do its job.

When I first created the custom list in VS, I added it to an existing feature in the solution. But for some reason which I still cannot understand, the feature did not put the new list on the server. But when I created a new feature and added the list to it, it did put the list on the server when it got activated.

I compared the two features together. They both have the same properties. The only difference is the existing feature includes some more items to deploy and has an event receiver associated with it though the event receiver does not do anything that could prevent the new list from getting deployed.

I cannot understand this behaviour and would appreciate an input if someone can explain it to me.

I hope this will help other people who might come across this issue before they start banging their heads against the wall!

0
votes

It is solution deployment type. Press F4 when in Package.package. Set "Deployment server type" to WebFrontEnd.