I have a Sharepoint feature that includes a settings list template, which is read by other features. The list must have a particular name for the whole thing to work, so ideally I would rather have a list created instead of a list template.
I tried playing with the EventReceiver class, by overriding FeatureInstalled method. It receives a parameter of SPFeatureReceiverProperties type. I've looked through documentation, and saw that one property, UserCodeSite, refers to the SPSite where the feature is installed, if it is a Site scoped solution, which it is in my case. That way I wanted to write a piece of code that would create a specific list from the list template included in the feature.
SPWeb_object.Lists.Add(listName, "", SPListTemplate_object)
However the property is null, as well as the Feature property. So I can't get the SPSite object, and I can't get the SPWeb object.
Any other ideas?