TF215085 Error When Building Using TFS 2008 Workgroup Edition

I came across a TF215085 error today while trying to build on a TFS 2008 Workgroup Edition and it turned out that the solution was to add the user that the Build Service was running as to the Team Foundation Server’s Licensed Users group.

http://www.bartonline.be/2008/03/22/TF215085+An+Error+Occurred+While+Connecting+To+Agent.aspx

Hands-Free TFS 2008 Install

Grant Holliday posted an almost hands-free TFS 2005 installation guide and I have been going through the same process for TFS 2008 so I thought I’d point out a few differences to be aware of as well as some amendments I made to Grant’s original process:

Part 2 - Building the ISO

  • The obvious changes:
    • Replace TFS 2005 with TFS 2008.
    • Remove TFS 2005 SP1 Quiesce Hotfix and TFS 2005 SP1.
    • Replace Team Plain with Team System Web Access.
    • Replace Visual Studio Team Editions / Team Suite 2005 with Visual Studio Team Editions / Team Suite 2008.
    • Remove Team Suite 2005 SP1.
  • I pre-extracted SQL Server 2005 Service Pack 2 to reduce the time taken to install:
    • SQLServer2005SP2-KB921896-x86-ENU.exe -x <TargetDir>
  • WSS is no longer required separately because it is automatically installed by TFS 2008.
  • Added TFS 2008 Power Tools.
  • Added TFS 2008 Installation Guide.
  • Added Office 2007 and Project 2007 (for building clients).
  • Edit TFS08\SQL2005ForATDT.ini and update the service account credentials.

My resulting directory structure was:

image

Part 3 - Installing Team Foundation Server unattended

  • I updated Grant’s script:
    • To reflect the changes above.
    • Added an INSTALLROOT environment variable in case you aren’t installing from D:\.
    • Added a TFSBUILDS user to run Team Build as.
    • Created users locally rather than in the domain (this was my requirement, if you want domain users simply add the /DOMAIN switch to the net user commands).

SET INSTALLROOT=D:\
SET TFSSERVICEPW=strongpassword
SET TFSREPORTSPW=strongpassword
SET TFSBUILDSPW=strongpassword
:: ############# User accounts
net user TFSSERVICE %TFSSERVICEPW% /ADD /EXPIRES:NEVER
net user TFSREPORTS %TFSREPORTSPW% /ADD /EXPIRES:NEVER
net user TFSBUILDS %TFSREPORTSPW% /ADD /EXPIRES:NEVER
ntrights -u TFSSERVICE +r SeInteractiveLogonRight
ntrights -u TFSREPORTS +r SeInteractiveLogonRight
ntrights -u TFSBUILDS +r SeInteractiveLogonRight
pause
:: ############# SQL 2005
:: # Run SQL2005 setup unattended
start /wait %INSTALLROOT%SQL05\Servers\setup.exe /qb /settings %INSTALLROOT%TFS08\SQL2005ForATDT.ini
pause
:: # Stop SQLBrowser service before SP2 install
sc stop SQLBrowser
sc config SQLBrowser start= auto
:: # Run SQL2005 SP2 unattended
start /wait %INSTALLROOT%SQLSP2\hotfix.exe /quiet /allinstances
:: # NOTE: I had an issue where after the service pack was applied the service account no longer had sysadmin access and this had to be rectified before continuing.
pause
:: ############ TFS Single-Server install
start /wait %INSTALLROOT%TFS08\at\setup.exe
pause
:: ############ VSTS install
start /wait %INSTALLROOT%VSTS08\setup.exe
pause
:: ############ TFS Team Explorer
start /wait %INSTALLROOT%TFS08\tfc\setup.exe
pause
:: ############ Team Build install
start /wait %INSTALLROOT%TFS08\BUILD\setup.exe
pause
:: ############ Team System Web Access
msiexec /i %INSTALLROOT%TFS08WA\TeamSystemWebAccess.msi /passive
pause
:: ############ Team System Power Tools
msiexec /i %INSTALLROOT%TFS08PT\tfpt.msi /passive
pause

Suppressing Continuous Integration Builds Part II

I recently blogged about how you can suppress continuous integration builds by adding ***NO_CI*** to the check-in comment. It was pointed out to me on the OzTFS mailing list that there is a property in Team Build called $(NoCICheckInComment) that contains this value so you can avoid having to hard-code it in your build script.

Visual Studio Hotfixes

Brian Harry has blogged about the MSDN Code Gallery web site which not only contains numerous code samples and add-ins but is also used to publish the Visual Studio hotfixes.

Modifying SQL Server 2005 Answer File To Use Network Service Account

When installing SQL Server 2005 using the answer files provided on the Team Foundation Server 2008 media one of the steps is to modify the answer file to specify which accounts you want to run the various SQL Server 2005 components as. In a number of scenarios you may want to use the built-in Network Service account instead of a “real” service account.

To do this you need to replace the following section:

;Security Context of service accounts
SQLBROWSERACCOUNT=”MyDomain\MyServiceAccount”
SQLBROWSERPASSWORD=”MyPassword”
SQLACCOUNT=”MyDomain\MyServiceAccount”
SQLPASSWORD=”MyPassword”
AGTACCOUNT=”MyDomain\MyServiceAccount”
AGTPASSWORD=”MyPassword”
ASACCOUNT=”MyDomain\MyServiceAccount”
ASPASSWORD=”MyPassword”
RSACCOUNT=”MyDomain\MyServiceAccount”
RSPASSWORD=”MyPassword”

With:

;Security Context of service accounts
SQLBROWSERACCOUNT=”NT AUTHORITY\NETWORK SERVICE”
SQLACCOUNT=”NT AUTHORITY\NETWORK SERVICE”
AGTACCOUNT=”NT AUTHORITY\NETWORK SERVICE”
ASACCOUNT=”NT AUTHORITY\NETWORK SERVICE”
RSACCOUNT=”NT AUTHORITY\NETWORK SERVICE”

Suppressing Continuous Integration Builds

There are some scenarios where when checking-in you would like to suppress any continuous integration builds from being initiated, the most common of these is when you check-in files as part of your build process (which I generally try to avoid but sometimes it is unavoidable). In Team Foundation Server 2008, Team Build will ignore any check-ins whose comments contain ***NO_CI***. Buck Hodges discusses this here.