Problems building VS2010 solution

I have some issues building a VS2010 solution on TeamCity 5.1. The solution consists of projects targeting .NET Framework 3.5.

It fails with the message:

  • C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2249, 9): error MSB3086: Task could not find "sgen.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

I have installed .NET Framework 3.5sp1 and .NET Framework 4.0 on the build agent. I have installed the .NET 3.5 SDK, but that comes as v7.0 (not v7.0A).

Any idea what SDK is referenced here? The upcoming .NET 4.0 SDK seems to be version v7.1 ( so I'm a bit lost here.

1 comment

As always, it gets resolved just after posting about it on a forum

The (or, my) solution ended up being a bit more Shooting-from-the-hip than I would like, but it works:

  1. Copied the contents of C:\Program Files\Microsoft SDKs\Windows\v7.0A from my local computer to the build agent
  2. Copied the regkey "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" from my local computer to the build agent and making sure all paths are valid

Please sign in to leave a comment.