I have created a web template in visual studio, it includes the standard element file and onet file, it also has a feature which is scoped to site level.
All this works fine, i can deploy it and can create a subsite based of this template.
I now want to add some code that creates lists etc when the sub site is created (lists are for sub site only).
How would i do this? I have tried adding another feature to the project which is scoped to web and putting code in this but i get the following error:
"Error occurred in deployment step 'Activate Features': Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred."