Creating SharePoint Solution Packages
By using the Package Designer, you can create and customize deployment packages. For example, you can add SharePoint project items and Features, reset the IIS server, set Feature activation scopes, and identify Feature dependencies. The designer also generates a manifest, an XML file that describes each package.
You can use the Package Designer to customize the package and generate the manifest. You can include SharePoint project items, configure whether the Web server should be reset, and set the deployment server type. For more information, see How to: Add and Remove Features and Items to a Package by Using the Package Designer.
Alternatively, you can use the Packaging Explorer to modify the Features and items in your package file (.wsp). For more information, see How to: Add and Remove Features and Items to a Package by Using the Packaging Explorer.
You can use Visual Studio and MSBuild to create package (.wsp) files to deploy your SharePoint solution. This process generates the manifest files needed for SharePoint deployment. For more information, see How to: Create a SharePoint Solution Package in Visual Studio and How to: Create a SharePoint Solution Package by Using MSBuild Tasks.
The following table shows the properties that you can customize in SharePoint packages with the Package Designer.
Package Designer Property
Description of default setting
Required. The default name of the package is set to ProjectName.
Optional. Select if you want to restart the Web server after the .wsp file is installed on the SharePoint server.
Deployment Server Type
Required. By default, the scope is set to ApplicationServer.
ApplicationServerDescribes a server that hosts services.
WebFrontEndDescribes a server that hosts Web sites.
Items in the Solution
All SharePoint project items and Features that can be added to the package.
Items in the Package
Optional. All SharePoint items and Features that you want to deploy in your package.
After you develop SharePoint solutions in Visual Studio 2010, you can customize how the projects are packaged.
The following table shows the two MSBuild targets that you can use to customize how the .wsp file is created.
The target that performs tasks immediately before the files are copied to an intermediate directory. You can modify the files before creating a package file (.wsp).
The target that performs tasks immediately after the files are copied to an intermediate directory.
For more information, How to: Customize a SharePoint Solution Package by Using MSBuild Targets.
The following steps occur when you create a SharePoint package (.wsp) in Visual Studio.
The Features and packages are validated to make sure that the physical and semantic structure of the package is correct.
The Features, project items, and package files in the package are enumerated. Manifest files for packages and Features are transformed to include all necessary information for deployment and activation. The tokens are replaced with the fully qualified value.
The customizable BeforeLayout MSBuild target is performed. You can create this step to make any custom modifications to the package before the .wsp file is created.
The enumerated files are copied to an intermediate directory.
The customizable AfterLayout MSBuild target is performed. You can create this step to make any custom modifications to the package before the .wsp file is created.
The files in the intermediate directory are added to the .wsp file.
When you package your SharePoint project, a .wsp file is created for you in the SolutionFolder\bin\BuildConfiguration folder. For example, if your solution is in drive:\Visual Studio 2010\Projects\ListDefinition1 and your build configuration is set to Release, the .wsp file is located in drive:\Visual Studio 2010\Projects\ListDefinition1\bin\Release.