Deploy SharePoint 2010 Solutions (WSP) files from Team Foundation Server 2010 Build Part 1

by Luke 27. May 2011 05:58

This article is a two part series which will explain how to Configure Team Build 2010 to Build a SharePoint Solution package and then deploy the solution package to a SharePoint server. In this scenario the build agent is running SharePoint Foundation 2010.

Step 1: Prepare the Build Machine

There are lots of good articles on MSDN which cover the basics of setting up a Build Environment. Once you are done preparing, the best pen test I have come across is to login to the build machine (as the build service account) and set it up exactly like you were going to develop on it. For instance, you would want to install:

  • · SharePoint Foundation 2010 – or SharePoint Server 2010, whatever your shop is developing against
  • · Visual Studio 2010 + Extensions for SharePoint Products
  • · Any additional 3rd party libraries you use like NUnit
  • · Grab the latest solutions and project files from Team Foundation’s Source Control
  • · Configure the project to deploy to the server and try to deploy your solution
  • · If everything builds, you are ready to proceed with deployment automation

Rather than re-create the content for creating a custom build I would recommend you take a look at this series of posts from Ewald Hofman. He put together some great information on customizing the Team Build process. I HEAVILY relied on his tutorials to get the build process going. You can either read his posts, specifically Part 1, Part 2, and Part 14. Or, I am going to attempt to summarize the necessary steps below. Now that the build machine is ready, let's move to the next setup.

Step 2: Wire Up a Basic Build

First we should make sure the build works. Navigate to Team Explorer and right-click on the Builds node for your project: choose New Build Definition…
clip_image001

Name it Build SharePoint, click on the Build Defaults section. Choose your Build Controller from the dropdown and put in the UNC path for where the built files will be placed. Leave the defaults for Triggers. If you don’t already have a workspace setup, then configure the locations for the projects you are going to build.

Click on the Process tab.
clip_image002

Verify the correct solution or project is selected in the Items to Build field. clip_image003 Go ahead and Save the Build and queue up a new build. It should output the assemblies for your project/solution into the drop folder.
clip_image004

Once the build finishes go ahead and double click the build to see the entire overview. Click the Open Drop Folder to view the output of the build. You might be asking, "Where is the Solution file?." That is our next task.
clip_image005

Step 3: Get a Solution Package

Right-click on your BuildSharePoint from Team Explorer and choose Edit Build Definition.
clip_image006

In the Process section, expand the Advanced grouping. Find the MSBuild Arguments field and enter /p:IsPackaging=true. Save the build definition and queue up another build. This time you should have a nice .wsp file in your drop folder.
clip_image008

Tags:

SharePoint 2010 | TFS | ALM

Comments

11/21/2011 8:45:29 AM #

What's your twitter account name for following Smile

willow leaf ficus for sale United States |

11/22/2011 12:01:12 AM #

this is really great and i also do go along inside a certain level, however am unsure when it actually works like that. i know somebody in philippines would you, so will talk about to determine what he says and get to this particular spot,.. great a single

Maryrose Mizzelle United States |

11/23/2011 4:10:06 PM #

I have so many. When I was a sports writer in the late 80s, I was assigned to cover a bowl game in Jacksonville, Fla. I told the company's travel agent Jacksonville and she assumed I meant South Carolina. Thankfully I noticed the mistake before departure and I was able to get my flight changed, but it meant flying on Christmas Day. That taught me to not depend on a travel agent to book the right city.

Estonia Tag Party United States |

11/24/2011 7:22:58 PM #

I know, this guy is such a Drama Queen!

Alethea Aken United States |

11/24/2011 9:58:13 PM #

Love the Message! <a href="http://www.make-wowgold.com">wow gold</a>

Buster Cavez United States |

Comments are closed

About Luke

C# .NET developer who really likes kettle style potato chips. Current favorite is Cape Code potato chips with a Henry Weinhards root beer on the side, mmmm delicious

 
 
The views and opinions on this blog site are my own and are not that of my employer.