TechBubbles Microsoft Technology BLOG

What is SharePoint Solution Package?

 

What is SharePoint Solution Package?

SharePoint has a system which bundles all the components of a SharePoint Foundation extension in to a single file which is called a Solution Package. The Solution Package file has the extension .wsp. 

SP2010

The contents of solutions package are

  • Assemblies
  • Web Parts
  • Site Definition files -  Site definition is a unique type of SharePoint website. It contains (onet.xml, webtemp*.xml, and default.aspx)
  • Application Pages -  these can be .aspx pages
  • Resource files and resources- Resource files (can be *.doc or *.xls ) and Resources are (*.resx)

Developers can easily change the site functionality using package files. It enables administrators to easily install the solution packages on server farm in one action instead of installing separately to each server on farm.

The solution package contains a manifest file and it tells the deployment engine what it should with those files inside manifest.

Solution packages have a hierarchical structure, Manifest file is at the root, Feature, resource and site definition directories are in subdirectories.

Solution Manifest file example

The below manifest file contains features, site definitions, assemblies and resource files.

   1: <Solution SolutionId="8ECE7210-D324-4439-D941-51377E845C2E" 

   2:   xmlns="http://schemas.microsoft.com/sharepoint/">

   3:   <FeatureManifests>

   4:     <FeatureManifest Location="testwebpart1\feature.xml"/>

   5:     <FeatureManifest Location=" testwebpart2\feature.xml"/>

   6:   </FeatureManifests>

   7:  

   8:   <TemplateFiles>

   9:     <TemplateFile Location="test\TestHomePage.ascx"/>

  10:     <TemplateFile Location="1033\xml\onet.xml"/>

  11:   </TemplateFiles>

  12:  

  13:   <Assemblies>

  14:     <Assembly DeploymentTarget="GlobalAssemblyCache"

  15:       Location="webparts.dll"/>

  16:     <Assembly DeploymentTarget="WebApplication"

  17:       Location="webapptest.dll"/>

  18:   </Assemblies>

  19:  

  20:   <RootFiles>

  21:     <RootFile Location="Resources\erp.resx" />

  22:     <RootFile Location="Resources\erp.en-US.resx" />

  23:     <RootFile Location="Resources\erp.es-ES.resx" />

  24:   </RootFiles>

  25:  

  26: </Solution>

When your solution is deployed to farm store then it is called a farm solution and if it is deployed to the solution store of a site collection then it is called a sand boxed solution.

The differences between the two solutions are

The components under farm solution are run with full trust where as components in sand boxed solution run with several resource access restrictions.

Farm administrator can only install the farm solution and site collection administrator can install the sand box solution.

There are some restrictions on sand box solutions to use the system resources.

Share this post :

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

Add Comment

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud