views:

575

answers:

3

Here's an interesting problem that really has me scratching my head. I have a project that's being built in TeamCity. It's been working fine until a developer added a resource file to one of the projects with some strings for another locale. He's added the .resx file under the Properties folder next to the default one. Here's the error message from the build log:

C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(2105, 9):
error MSB3091: Task failed because "AL.exe" was not found, or the correct
Microsoft Windows SDK is not installed. The task is looking for "AL.exe" in the "bin"
subdirectory beneath the location specified in the InstallationFolder value
of the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A.
You may be able to solve the problem by doing one of the following:
1) Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5.
2) Install Visual Studio 2008.
3) Manually set the above registry key to the correct location.
4) Pass the correct location into the "ToolPath" parameter of the task.

There are a number of things here that I can't work out. - How come it can find AL.exe for the default .resx file but not for this new one? - Why's it looking in a registry key that looks Vista-specific, when the build is running on Server 2003?

Any ideas?

A: 

Check msbuild from x86 is used. There should be an option in TeamCity build runner.

Was VS2008 installed on the machine?

Eugene Petrenko
No, VS2008 was not installed. It's a build server, not a development workstation.
Tim Long
A: 

Make sure the Windows SDK is completely installed on the server. AL.exe (Assembly Linker) is included with the .NET SDK (not the runtime).

(I have the same problem on my TFS server with ClickOnce, but too lazy to fix)

leppie
Correct me if I'm wrong, but doesn't AL.exe get used to build _every_ project? If so, why does it only fail on this one project upon addition of a resource file? I need to understand the failure mechanism before I fix it.
Tim Long
AL.exe is normally used with linking satellite assemblies.
leppie
Tim Long
+1  A: 

Problem solved by installing Windows SDK for Windows Server 2008 and .NET Framework 3.5 SP1.

I don't understand how MSBuild got out of step with its tools, perhaps I never will discover the reason, but installing that SDK fixed the problem for me.

Tim Long