0

I have a continuous integration server (windows 2003) where i build the source codes before deployment. When one of my source code developed with dotnet framework 4.0 was build using the msbuild available in the the dotnet framework v4.0.30319 it shows the following error:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (2249,9):

errorMSB3086: 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

When i searched for this error i got few suggestions:

   1.Install visual studio 2010 (can't do this as it is not a development environment)
   2.create the simillar sdk folder structure as in local machine in the server and make necessary registry confihurations (a bit complex, is it?)
   3. Install sdk component seperatly (Is this a suitable option?).

Is it possible to get the sdk if i upgrade the framework? If so how do i upgrade the frame work to get the latest msbuild version?

Harun
  • 5,109
  • 4
  • 38
  • 60

1 Answers1

0

Installation of .Net SDK's on build machines is required. How you go about this is up to you. In the future if you require msbuild you will most likely require a Visual Studio installation (this appears to be from VS 2013 onwards). For prior version of the SDK you can review the following link as to where to download the SDK's.

https://en.wikipedia.org/wiki/Microsoft_Windows_SDK

Install the suitable stand alone SDK on your build system and all should come right.

Also for more information:

The reference to the key is for Visual Studio 2010.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A

Installing "Microsoft Windows SDK for Windows 7 (7.1.7600.0.30514)" on the build machine will enable the machine to build the source your looking at. Note however that these are not equivalent SDK's (Visual Studio 2010 refers to its SDK as 6.1.7600.16385).

Edit: Also check out the highest score answer here: Running MSBuild fails to read SDKToolsPath

Community
  • 1
  • 1
Jason
  • 840
  • 11
  • 23