SharePoint 2010 Site templates : how to deliver with custom assemblies

The site templates are no longer .stp file in 2010, but they are improved upon as solution files (.wsp). That changes the delivery equation a lot, as earlier we could deliver site templates as a part of solution. But never-than less, in Visual studio 2010 we have the option to import the solution and operate it upon.

Follow these steps to deliver a site template customized with a custom assemblies (web part, event handler etc)
  1. Save the site as template to generate the .wsp file
  2. Import the solution in Visual Studio 2010 to create a new project


  3. Next, right click on the package to open Solution Designer



  4. In the advanced tab, you can specify new assemblies (ensure that they are included in the project)


  5. The default features can also be modified in the edit options of the features. The properties specified here will overwrite the existing feature properties


  6. All set, simply create the package of the project and deliver the wsp file.