Thursday 29 October 2015

SharePoint WSP Deployment Process


In this article I'm going to explain how to deploy WSP files using Central Administration and Power Shell Script. 

This article will helpful to those who are looking for the same.



Summary



Whenever we are moving SharePoint Solution from one place to another (or) from one environment to another environment we need to deploy webpart wsp files in to new environment.

In previous article we're discussing how to create webpart and how to generate wsp file using that webpart.

I suggest read following article before go further
In this article I'm going to explain how to do deployment step by step.
 

Step 1:

 
First we need to store all the wsp files into one folder, and then open Central Administration using Administrator logins.
 
 

Step 2 : 

Click on System Settings under Central Administration, once you click System Settings in the screen you can able to see the below options.
  • Servers : If you want to configure server then use this option.
  • E-Mail and Text messages : If you want to configure Email then use this option.
  • Farm Management: If you want to configure farm level solution then use this option.
 

In our scenario we need to configure in Farm level. So, I select Farm Management, and then choose Manage Farm Solution.
 

Step 3 :


When you click on Manage Farm Solution, it's listed out all the solutions whatever we deployed against that particular site collection.






Step 4 :


Now, we need to think one thing, whether we are going to deploy New WSP file or Existing WSP file?

If that is existing file, then we can do in 2 ways existing WSP file updating or Remove the solution and then deploy as a fresh one.

The best way is remove the solution and deploy as a fresh solution, because while update time in sometimes it's not updated 100% perfectly. 

Now, I choose delete existing file and then add as a fresh solution.

For deleting the existing file, click on the particular WSP file, there we can see the WSP file History and Header section we have 3 options like Deploy Solution, Retract Solution and Back to Solutions.

Deploy Solution: After WSP file is added to the Site collection we can deploy it using this option.

Retract Solution: If we want to remove the file from site collection then using this option we can remove it.

Back to Solutions: In the name of text itself we know what it is doing, it's going back to the previous status.




In our scenario we need to delete the existing file, so I can choose Retract Solution option, once I click on that it's redirecting to the Retract Solution page, see the below screen shot.



In SharePoint whatever action we perform, we can see two panels, left hand side section and right hand side section. In Right Hand side its retrieve the result against our search and in left hand side, details will show against right hand side data.

In the above screen, see the last option Retract From? In right hand side you can see the dropdown it's loaded all the site collection information into that dropdown.

If you want to retract the WSP from all the site collections then choose "All content Web Applications" or else if you want to retract the WSP from particular site collection then choose that particular site collection and click on "OK" button.




You can able to see the retraction process, see the below screen shot.



Once Retracting is completed, the status of the WSP is Not Deployed, and then opens the WSP file by clicking on that and then remove it.

Now, the WSP file is removed from the farm solution, you can Add solution again and then deploy it in required site collection.

Adding WSP solution :


Open SharePoint Management Shell with Admin logins and then use below script to Add solution in to central administration.

Script:







Add-SPSolution "C:\Users\farm_admin\Desktop\Foldername\TestWebPart.wsp"








Once WSP added into solution, then you can click "Deploy Solution", it's again redirecting into Deployment page there you can choose the Deployment location whether it can be globally Deployed or specific Site collection.

Conclusion:

 
 Hope this article will helpful to those who are looking for the same, if you have any queries regarding this post then please put your comments in comment section.




 

No comments:

Post a Comment