English

Error: Task failed because "sgen.exe" was not found, or the .NET Framework SDK v2.0 is not installed

Error Message

In the Visual Studio Build window, when building an ArcGIS Explorer Sample, the following error is displayed:

"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."

This error may be encountered when building the QueryDemographics sample in Release mode.

Cause

The SGEN tool is part of the .NET Framework SDK and is used to optimize serialization at build time. This error is caused by problems with registry keys relating to Visual Studio 2008 and the .NET Framework SDKs that help locate this tool.

Solution or Workaround

This error can be ignored if the add-in project build successfully produces an add-in archive file. For example, the QueryDemographics sample does not require the SGEN tool to run successfully.