Skip to content

How to Create a Deployment CAB project

Deployment of web parts is done through CAB files.  These cab files contain a manifest.xml file that explains the contents of the CAB file, at least one DWP file which specifies the properties for a web part and normally one or more DLL files which are the executing code for a web part.
Visual Studio creates a template Manifest.xml and a sample DWP file for you when you create a new SharePoint project.  This “how to” document will show you how to create a CAB file project in Visual Studio.  Follow these steps to create the cab file project:
  1. Right click the solution in Visual Studio and select Add-New Project.
  2. In the Setup and Deployment Projects select Cab Project
  3. Enter a name for the project. Ideally this is the name of the web part project followed by “CAB”.
  4. Verify that the Location is the correct location.
  5. Click the OK button
  6. Right click the new cab project, Click Add-Project Output
  7. In the project drop down in the dialog that appears select the project file of the web part – if necessary.
  8. Click Primary Output and hold the control key down while clicking Content Files so that both are selected.
  9. Click the OK button.

If you need to add additional DWP files to the project, make sure to set their build action to content.  This can be done by selecting the DWP file, right clicking, selecting properties and setting build action to content.

Help Your SharePoint User

No comment yet, add your voice below!

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share this: