Thursday, November 25, 2010

Build fails after upgrading to Visual Studio 2010

After upgrading our solution and projects to Visual Studio 2010, our builds started to fail with the following error:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (1917,9):
errorMSB3086: Task could not find "LC.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A".
Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed

For a reason I don’t know it expects the 7.0A SDK. And indeed on the build server this SDK was not installed. With that knowledge I copied the directory "Program Files\Microsoft SDKs\Windows\v7.0A" from my development machine to my build server. I then exported the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" registry key from my development machine and merged into the registry of the build server. Problem solved.

No comments: