I'm creating a site definition which provisions a subsite based to a webtemplate(wsp) file. This webtemplate file is packed in a feature containing a module.When the feature is activated the wsp file is added to the solution gallery. Another feature, a provisioning handler then creates a subsites based on this template.
- Just adding to the solution gallery does not activate the solution. Unless the added solution is activated it cannot to used as a template. How can I activate the solution through code?
- Alternatively we can add the solution to SPFarm.Solutions and then perform deploysolution. Is it a good idea to proceed this way?
- Is there any better approach to this requirement?
Any help would be greatly appreaciated.