Deploying WSP in Sharepoint Solutions

Create a new SharePoint 2013 empty project in Microsoft Visual Studio 2013.

SharePoint 2013 empty project

Create a new project named "Registration" and click OK.

Enter the valid SharePoint site URL and select Deploy as a Farm solution, then click Finish.

Enter the valid SharePoint site URL

Now right-click on the project and click Add new item.

add new item

Create a new Visual Web Part named "Demo".

visual webpart

Demo

Now I will add a simple Hello World Web Part on the button click action displayed using label.

click action displayed

Double-click on the button to add some code to display the message.

adding some code

Now Save the project and right-click on the project and select Publish.

Right click on the project

publish

Now the Registration.wsp has been published to the file system.

Registration wsp

Now open the SharePoint Management Shell using “Run as administrator”.

Command: stsadm –o addsolution filename Registration.wsp.

Command

Now go to SharePoint 2013 Central Administration to deploy the solution.

Under System settings click Manage Farm solutions.

Click on the solution “registration.wsp” and click Deploy solution, then click OK.

registration

Click Deploy solution

Click ok

Now the solution has been deployed successfully.

deployed successfully

Now go to the site.

Go to site

Click on edit page to add a Web Part.

To add a webpart

Now click on the button and display the message.

It displays message

One more way to deploy the solution is to directly deploy it from Microsoft Visual Studio.

This document shows how to deploy the .wsp file in SharePoint 2010 and 2013.

Up Next
    Ebook Download
    View all
    Learn
    View all