Upgradesolution: Stsadm operation (Office SharePoint Server)

Applies To: Office SharePoint Server 2007

This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.

 

Topic Last Modified: 2015-03-09

Operation name: Upgradesolution

Description

Upgrades an existing solution. The solution to be upgraded could be either deployed or not deployed; however, the immediate or time parameters apply only if the solution has been deployed.

If the solution is not deployed, the upgradesolution operation will simply update the bits stored in the database for a solution and create the backup for reversion.

Syntax

stsadm -o upgradesolution

-name <solution name>

-filename <upgrade file name>

[-time] <time to upgrade>

[-immediate]

[-local]

[-allowgacdeployment]

[-allowcaspolicies]

[-lcid] <language>

Parameters

Parameter (short name)

Value

Required?

Description

name

A valid name of a solution, such as “Upgradesolution.wsp”

Yes

Enables the administrator to specify the name of a solution inside of the solution store.

filename

Any one of the following formats:

  • *.cab

  • *.wsp

  • *.wpp

Yes

Enables the administrator to specify the name of the solution on disk. If an administrator specifies the filename parameter, this is equivalent to calling addsolution and addwppack operations first, and then deploying the solution.

time

A valid date:time format that is culture-specific to the administrative language, such as “2/16/2007 12:15:12”

The -time parameter is not required if either the immediate or local parameter is specified. Otherwise, the -time parameter is required.

Enables the administrator to schedule the time that the deployment should occur.

Time requires that a user use a time format acceptable to the DateTime.Parse method. If the date time does not parse correctly, the following error message is displayed:

"‘<time user entered>’ is not a valid time format. Deployment was not initiated."

immediate

<none>

No

Causes the deployment to occur immediately after the command is executed.

local

<none>

The -local parameter is not required if either the -immediate or -time parameter is specified. Otherwise, the -local parameter is required.

Deploys the solution synchronously on the local computer only. The timer service is not used.

A developer must specify the -immediate, -local, or -time parameter. If one of these is not specified, the following error message is displayed:

"Deployment type was not specified. You must specify a deployment to just this server (-local), to all servers in the farm (-immediate), or a delayed deployment to all servers in the farm (-time)."

allowgacdeployment (allgac)

<none>

No

If the solution contains assemblies that need to be put in a global assembly cache (GAC), this parameter must be specified. Otherwise, the following error message is displayed:

"The solution '<solution name>' needs to install assemblies in the Global Assembly Cache (GAC). If you fully trust this solution, use the -allowgacdeployment parameter to deploy."

allowcaspolicies (allowcas)

<none>

No

If the solution contains Code Access Security (CAS) policies, this parameter must be specified. Otherwise, the following error message is displayed:

"The solution '<solution name>' needs to add Code Access Security policies. If you fully trust this solution, use the -allowcaspolicies parameter to deploy."

lcid

A valid locale ID, such as "1033" for English

No

Language locale ID of the solution