I am trying to build and deploy a .NET 4
project using MSBuild
Web Deploy and TeamCity
, I got this working fine (eventually) with an instance of TeamCity running on my local development machine, however when I tried to set up a fresh TeamCity instance with the same settings I got the following error:
\Microsoft.Common.targets(2249, 9): error MSB3086: Task could not find "sgen.exe"
using the SdkToolsPath
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\" 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'm running Windows Server 2008, and have .NET 4 installed, including (I believe) MSBuild 4. I've also installed Windows SDK 7.1 as other threads suggested this may be the problem, but still no luck. Any ideas or advice would be appreciated.
Thanks
I had the same problem with TeamCity. Here are my steps to resolve:
If you accept the default paths for installation, sgen.exe will be found here:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\sgen.exe