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?

Tim Long
  • 13,508
  • 19
  • 79
  • 147

3 Answers3

3

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
  • 13,508
  • 19
  • 79
  • 147
  • 1
    i had the same problem on development machine and i just copied the al.exe from 6.1A to 6.0A and worked. Installing the sdk didn't work. – Orhan Cinar Jun 19 '11 at 13:15
0

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

Was VS2008 installed on the machine?

Eugene Petrenko
  • 4,874
  • 27
  • 36
0

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
  • 115,091
  • 17
  • 196
  • 297
  • 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 Sep 29 '09 at 15:26
  • 1
    AL.exe is normally used with linking satellite assemblies. – leppie Sep 29 '09 at 16:00
  • 1
    Although the SDK was installed, and AL.exe was present, MSBuild was looking for it in the wrong place, through a registry key that didn't exist. It seems like somehow MSBuild has got updated to a later version which looks at the wrong registry key, while steadfastly ignoring the older, existing & correct registry key that would have enabled it to work. Anyway, installing the Server 2008 SDK worked (even though it's a 2003 server). – Tim Long Oct 01 '09 at 16:15