Tuesday, September 25, 2012

Creating and Deploying Solutions in SharePoint 2010

For those who are just looking for PowerShell commands:
First you need to add your solution

Add-SPSolution c:\MySharePointSolution.wsp

Once the solution is added to your environment, install it.

Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://MySharePointServer:1111 -GACDeployment

and we are done. Go to your site, confirm if the feature is already activated, if not, Activate it and enjoy.

For those who are looking for a more elaborate show:

Deploying your solutions into SharePoint 2010 is very easy. Its even easier if you are in your development phase and wants to deploy your solution in a development environment with Visual Studio 2010.
Here is a step by step process of creating, adding and deploying your solutions into SharePoint 2010.

When developing SharePoint Solutions, you were asked where you want to publish your solutions and you chose a sharepoint site of your choice.
In case you are wondering where that URL is stored in your Visual Studio solution, select the project from your Solution Explorer in Visual Studio 2010 and press F4, this will show you the properties for that solution.
From here you can change the URL of you site and use Visual Studio Deploy feature to deploy your solution into SharePoint site.

Situation changes when it comes to deploying your solution on a Test or Production Environment. You cannot use Visual Studio any more. If you assume that installing Visual Studio on your Test or Production servers will solve the problem, you are wrong. No such softwares should be installed on the above mentioned environments.

As now we have developed an understanding that our current solution will not work for our Test and Production Environments, our new friend Powershell comes to the rescue.

No comments: