Solution packages in Sharepoint 2010

First of all if you do not know what is this solution package then here is a simple definition : A solution package is a distribution package or a container that is use to deploy your custom SharePoint Server 2010 development work to the SharePoint Web servers.

In SharePoint 2010, user have many options to create and deploy solution packages for their custom development work, let me start with the most used method to create a solution package

1. Create Package using Visual Studio 2010 -
Developers can build their SharePoint solutions in Visual Studio 2010 and produce .wsp files by using the automated build process. After you build your thing in VS 2010 using the SharePoint related templates available, you can just hit ctrl + F5. This will create a .wsp file and will also deploy it to the SharePoint server you are developing on.

Create a package - To Create a package in VS 2010, In Solution Explorer, click the project that you want to package. Then, on the Build menu, click Package.

Where is the .wsp - In Solution Explorer, click the Show All Files button. This shows all project items, including excluded and hidden items.Expand the bin node and
Expand the Debug or Release node to get your .wsp file.

Modify solution Package - When you create a SharePoint solution, Visual Studio adds the default SharePoint Features (or items) to the solution package. Before final deployment, you can add and remove SharePoint project items and Features using the SharePoint package. To open Package Designer In your Solution Explorer, right-click Package and then click View Designer.
Use Add\Remove (>) or(<) button to add the items into the solution package.

In addition to select files for packaging, the Package designer allows you to set various properties for the deployment. Some of the properties that you can set are :

1. Name - It is a Required Property. The default name of the package is set to ProjectName.

2. Reset WebServer - Optional. Select if you want to restart the Web server after the .wsp file is installed on the SharePoint server.

3. Deployment Server Type - This is a Required Field. By default, the scope is set to ApplicationServer.

4. Items in the Solution - All SharePoint project items and Features that can be added to the package.

5. Items in the Package - Optional. All SharePoint items and Features that you want to deploy in your package.

After, VS 2010 lets see at other options to create a solution Package in SharePoint 2010.

2. Solution Package by Using MSBuild - Using MSbuild you can build, clean, and validate a SharePoint package (.wsp) using command-line MSBuild tasks on a development computer. For this you need to Open a Visual Studio command prompt window -> Cd to your Project folder -> Type the command
"msbuild /t:Package ProjectName.csproj" to create a package for the project. ProjectName is a name for the solution Package.



This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at .

Copyright (c) 2010 @ All rights are reserved.Do Not Copy.

@ Learning