Home > Development, SharePoint Server 2010 > Operations performed on a solutions package

Operations performed on a solutions package

Installing and deploying a solution package

After we have packaged the solution, we need to deploy and install it in SharePoint environment.  The installation process copy the solution package file to configuration database and register it as a solution which is ready to be installed, the deployment process pushes the code to each web server.

There are more than way for installing and deploying the Solution package

1-      Using the SharePoint developer Tools (using Visual Studio 2010).

2-      Using PowerShell scripts.

3-      Using STSADM commands.

Using the SharePoint developer Tools (using Visual Studio 2010)

We can deploy our solution by using Visula Studio 2010, by right Click on Project Name then select Deploy

 

Using PowerShell Scripts

Another option for Deploying and installing Solution Package by using Power Shell Scripts , firstly we need to load Microsoft.SharePoint.PowerShell then calling Add-SPSolution Command and passing        –LiterPath parameter using Solution path value.

For installaing the solution package use the following Scripts:-

Add-PSSnapin Microsoft.SharePoint.PowerShell  -ErrorAction  “SilentlyContinue”

Add-SPSolution –literpath “C:\Solutions\StockExchange.wsp”

For Deploying the solution package use the following Scripts:-

Install-SPSolution –identity  “StockExchange.WSP” –local –GACdeployment

There are 3 parameters , -identity whose value must be the name of the solution , -local which means that the deployment will be deployed on local server, – GA deployment used with solutions which have Dll which will added to GAC.

For complete deploying and installing Scripts:-

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction “SilentlyContinue”

Add-SPSolution -LiteralPath “C:\Solutions\ StockExchange.wsp”

Install-SPSolution -Identity ” StockExchange.wsp” -Local -GACDeployment

Using STSADM Commands

The third option for deploying and installing solution package is using STSADM commands, for deploying solution package use the following commands

stsadm -o deploysolution

   -name <solution name>

   [-url] <virtual server URL>

   [-allcontenturls]

   [-time] <time to deploy>

   [-immediate]

   [-local]

   [-allowgacdeployment]

   [-allowcaspolicies]

   [-lcid] <language>

   [-force]

 

 

For installing solution package use the following syntax

stsadm -o addsolution

   -filename <solution file name>

   [-lcid] <language>

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: