In this post we will discuss what is a solution package in SharePoint 2010. You can also check out my previous posts on:
This is nothing but popular the .wsp file in SharePoint 2010.
A solution package is a CAB file with a .wsp file name extension and a manifest file. You can create this manually by using a tool known as Makecab.exe.
But in SharePoint 2010 while developing solution using Visual Studio 2010
it is very easy to create .wsp file. Whenever you will build the project, if the build succeded then the .wsp file will be created inside the bin\Debug folder.
A solution package is a distribution package that delivers your custom SharePoint Server 2010 development work to the Web servers or the application servers in your server farm. Use solutions to package and deploy custom Features, site definitions, templates, layout pages, Web Parts, cascading style sheets, and assemblies.
Below are the components that can be packaged in a solution file:
- .NET Framework assemblies, typically Web part assemblies and event receiver assemblies.
- Deployment files such as resource files, pages, images or other helper files.
- Features, which allow you to activate and deactivate code in a Web site and provide functionality that include elements such as custom lists, libraries, fields, and content types.
- New templates and site definitions etc.
You can use solution packages to deploy new solutions and upgrade existing solutions across the farm. You can package all your SharePoint Server entities as one file, add the file to the solution store, and deploy it to the front-end Web servers in the farm.
In SharePoint 2010, user also can save a customize site as a template, which is a .wsp file and that can be deployed on another farm.
You can deploy the solution package using PowerShell
Before Deploying the solution to the farm, we need to add the solution to the farm like below:
Add the solution to the farm:
Add-SPSolution -LiteralPath <SolutionPath>
Install the solution to the farm:
Install-SPSolution -Identity <SolutionName> -WebApplication <URLname>
Install-SPSolution –Identity MySolution.wsp –WebApplication http://URLOfWebApplication -GACDeployment
You can also check out a very good article on: