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:
- Right click the solution in Visual Studio and select Add-New Project.
- In the Setup and Deployment Projects select Cab Project
- Enter a name for the project. Ideally this is the name of the web part project followed by “CAB”.
- Verify that the Location is the correct location.
- Click the OK button
- Right click the new cab project, Click Add-Project Output
- In the project drop down in the dialog that appears select the project file of the web part – if necessary.
- Click Primary Output and hold the control key down while clicking Content Files so that both are selected.
- 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.
No comment yet, add your voice below!