SGEN.EXE Problems when trying to build a release build


  • All


    I have been using teamcity to churn out upwards of a 100 successful builds using MsBuild of the application I am currently working on. However today I switched the configuration over to Release from Debug and now I am getting the following error

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1892,9): error MSB3091: Task failed because "sgen.exe" was not found, or the .NET Framework SDK v2.0 is not installed. The task is looking for "sgen.exe" in the "bin" subdirectory beneath the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK v2.0. 2.) Manually set the above registry key to the correct location. 3.) Pass the correct location into the "ToolPath" parameter of the task.

    Can anyone explain why this happens and what i can do to fix it?


    I am currently using Visual Studio 2005, however the builds are running via TeamCity and Msbuild


    Tuesday, January 27, 2009 4:30 PM

All replies

  • Hi I am having this same issue.  I look in C:\Program Files\Microsoft Visual Studio 10.0\SDK\v3.5\Bin and it is empty.  Where can I get the sgen.exe file?


    Thank you

    Thursday, January 12, 2012 11:40 AM