SharePoint Solutions File(.wsp)

SharePoint Solutions File(.wsp)


A SharePoint solution file is a collection of feataures, webparts and files with the extension .wsp
The .wsp file is a .cab file which is a windows archive format.
The general content of the .cab file are as follows,
•    Manifest.xml
•    CustomFeatureCreated\feature.xml
•    CustomFeatureCreated\webpartsmanifest.xml
•    CustomFeatureCreated\webpartcreated.webpart
•    CustomFeatureCreated.dll
•    Images(if they are used in the solution)


Once the .wsp file is move to the below mentioned directory C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin
Executing the commands below adds and deploys the solution to the SharePoint sites.

•    stsadm -o addsolution -filename SolutionName.wsp
•    stsadm -o deploysolution -name SolutionName.wsp -immediate -allContentUrls -allowGacDeployment
•    stsadm -o execadmsvcjobs

Activate the feature in SharePoint Site > Site Settings  > Site Features
Add the new webpart  from SharePoint Site  >  Site Settings  >  Web Parts  >  New

Debugging the solution in Visual Studio:

In order to debug the solution in visual studio ensure that
Project Properties > Build > Output > Output Path > is set to c: \Inetpub\wwwroot\wss\VirtualDirectories\Sharepoint MySite\bin\
Redploy the solution following the steps mentioned in Deployment section.
Now, we can modify the .cs files and can debug and see the changes in the webpart without having to deploy the solution every time.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s