Ruminations of J.net idle rants and ramblings of a code monkey

Installing TFS Build on XP/Win2K3 x64

TFS

Here I was happily installing a test environment for TFS. One of the requirements for this environment is x64 so, of course, I’m installing as much as possible on x64. Of course, that does not include the TFS Application Tier … it’s 32-bit only and, while there are hacks out there to get it to install on x64, I’m avoiding that as a) it’s not supported and b) they require manually hacking the MSI file, something that I think is a Very Bad Idea. Part of this was installing TFS Build Services in Win2K3 x64; Win2K8 isn’t blessed in this environment, only Win2K3. In looking at the TFS Installation Guide, it does clearly say that TFS Build will run on x64 on WOW64 mode. And it does.

But … you may run into a little issue with installing TFS Build on x64. It’s the same issue described in this forum post. In shorts, here’s what happens:

You’re cruising along in the TFS Build install and all is hunky-dory.

You then get this error:

Microsoft Visual Studio 2008 Team Foundation Server Build Setup
Error 32000.The Commandline '"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe" -ga "[Domain]\[Account]"' returned non-zero value: 1.

Running the command manually gives you this:

[c:\windows\microsoft.net\framework\v2.0.50727]aspnet_regiis.exe -ga "[Domain]\[Account]"
Start granting SFINTERNAL\tfsbuild access to the IIS metabase and other directories used by ASP.NET.
An error has occurred: 0x800703f0 An attempt was made to reference a token that does not exist.

Keep in mind that this is IIS 6.0 on x64. By default, it’s running in 64-bit mode. And it won’t allow 32-bit applications. But … you are running aspnet_regiis from the x86 (32-but) installation folder. Hmmm … a clue perhaps? As it turns out, that’s the key to the solution. Here’s what you need to do (and it does not include a manual install): flip IIS 6.0 into 32-bit mode. Unlike IIS 7.0, IIS 6 does not support running both 32-bit and 64-bit applications at the same time. To do this, running the following from the command line:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

When the installation is finished, you can flip IIS back to 64-bit mode – this seems to work just fine (so far, at least) by change the 1 to a 0.