Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have more than 20 solutions to deploy or retract at the same time, Currently i doing the deployment/retract one by one and each deployment is required an iis reset and this causes around 20 minutes for the complete deployment/retract.Is there a way to deploy or retract multiple solutions in a single batch process. I am using .net to do the deployment.

share|improve this question
    
Are there any dependencies between the solutions or are they completely independent? Can you explain why there are 20 separate solutions? –  Mike Oryszak Sep 10 '11 at 15:27
add comment

3 Answers

I prefer to group the operations. So I start by retracting all solutions, delete them, run an application pool recycle and restart the owstimer (if there are timer jobs in any of the solutions), then add all solutions and deploy them.

I have been working on projects with upto 30 solution packages at we followed that pattern. It is slow, yes, but it works everytime. Also it is seems very import to only run one deployment job at any time. So we built a tool to check for the deployment timer job to be finished before continuing with the next deployment operation. Gary Lapointe has built this into his tools.

Again, it might seem awkward and time consuming but for this is the solution that works every time and on single server as well as farms with multiple front-ends.

share|improve this answer
add comment

When retracting solutions from SharePoint 2010, it only does an App Pool recycle on the web application the solution is deployed to (if it is deployed to all applications, then each app pool will get recycled). SharePoint treats each retraction as a separate timer job and there isn't any way to change that behavior. So, after each retracted solution, the applicable app pools will be recycled.

share|improve this answer
add comment

Not sure about I am using .net to do the deployment. in your question.

There are two basic ways to deploy/retract multiple solutions on SharePoint 2010:

stsadm command ('The Old Way')

You can use stsadm commands to retract/deploy your solutions and put them in batch file. It can look something like this:

stsadm -o retractsolution -name [solution1]
stsadm -o retractsolution -name [solution2]

stsadm -o execadmsvcjobs

stsadm -o deletesolution -name [solution1]
stsadm -o deletesolution -name [solution2]

stsadm -o execadmsvcjobs

stsadm -o addsolution -filename [solution1]
stsadm -o deploysolution -name [solution1] -immediate
stsadm -o addsolution -filename [solution2]
stsadm -o deploysolution -name [solution2] -immediate

stsadm -o execadmsvcjobs

By stopping SharePoint 2010 Administration service (SPAdminV4) before executing this batch you will save some time (but not too much). Then again instead of retracting, deleting, adding and deploying you can use stsadm -o upgradesolution just to upgrade your solutions (if this is requirement).

PowerShell script ('The New Way')

PowerShell is very powerful (!) tool for scripting. IMHO you need to solve your deployment by using some PS script (eg. second link). Since I would need few more pages of text to explain everything I will just point you in right direction:

share|improve this answer
2  
Deployment does not work reliable when only setting off the deployment jobs as in your STSADM example, especially with many solutions and/or multiple servers. It is essential to wait for the actual deployment time jobs to terminate. –  Bernd Rickenberg Sep 14 '11 at 12:33
    
true if your solutions are 'connected' in any way –  Vedran Rasol Sep 14 '11 at 12:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.