Applying Team Foundation Server 2012 Update 1

I have been eagerly awaiting the November update for Team Foundation Server 2012 from Microsoft. My team has successfully adopted Kanban as a development methodology, and we’ve been wanting to get the new bits up and running in our on-premise TFS environment so we can take advantage of the new tooling surrounding the Kanban board. One thing that may not be apparent at first glance when visiting the download site (Visual Studio Downloads) is that the update is not simply the update. You must use the full installer (Visual Studio Team Foundation Server 2012 with Update 1) to get the update.

Download the .iso image and extract it with the tool of choice and run the tfs_server.exe installer (or run the web installer).install-splash Keep in mind that the installer may require you to reboot your server early on in the process, so prepare for your system to be offline during the upgrade. In fact, after you run the installer, your server will be offline while the upgrade modifies your databases, so be prepared for a bit of downtime anyway.

Once the installer has completed successfully, we need to run the upgrade wizard. Thankfully, the upgrade wizard launches automatically. On the first page of the wizard, click Next to get to the Databases page.

On the Databases page, click the List Available Databases link list available databaseson the right to populate the Databases listbox with your configuration database. You will notice that the left pane’s tree will populate with additional options once the wizard recognizes your TFS configuration database. configuration database At this point, you will need to select the option for AlwaysOn Availability, if your database is using that feature, and confirm that you have a database backup before continuing (you DO have a backup, right?). Click Next.

On the next page of the wizard, choose the same service account credentials you used for the original installation. service account We use a domain service account for our TFS installation. Click Next.

The rest of the upgrade (Reporting Services and SharePoint) will largely depend on how your environment is configured. The wizard should recognize the locations of your existing services and honor them. One thing to remember is to click the List Available Databases link list available databaseson the Database step when configuring Reporting Services. This will help the wizard locate the warehouse database required for Reporting Services.

And for SharePoint, to keep things as they are, step through to the Settings page and make sure the radio button for Use current SharePoint settings is selected (it is the default) and you should be fine. If you wish to modify your installation to point to a different SharePoint environment, well, that’s a topic for another time.

Step through the wizard until you’re prompted with the Configure button and you can complete from there. So far, I haven’t had any issues updating a few different server environments with the new update. I hope your results are the same.

Place a Null Value in a SqlParameter with an Extension Method

I had to write some straight-up ADO-type code today to talk to SQL Server. Some of the values I’m passing into a stored procedure can be null, and as we’ve all experienced, the .AddWithValue() method doesn’t coerce null to DBNull.Value on its own. And by “we’ve”, I mean all of us who program in .NET, of course.

So, I wrote a simple extension method that uses DBNull.Value in the case where the value passed to the method is null:

publicstaticvoid AddWithNullableValue(this SqlParameterCollection parameterCollection, string parameterName, object value)
{
    if (null == value)
        parameterCollection.AddWithValue(parameterName, DBNull.Value);
    else
        parameterCollection.AddWithValue(parameterName, value);
}

Nothing ground-breaking, by any means. But, it sure does clean up my code. Hope it helps someone else.