|
Author: Jenny Nguyen
|
|
I have recently install Visual Studio 2005 along with Visual Studio 2003 and 2008. Then when I try to compile the application I get this error: Error 161 Task failed because "sgen.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "sgen.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A. You may be able to solve the problem by doing one of the following: Well the first two choices is definately is not an option for me as it would take forever to install Visual Studio so I will try one of these below solutions: Solution 1 Try to add the registry key v6.0A with the value "InstallationFolder". You need to add the key the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A Now reboot your computer and your problem should be fix. If its till not fix then try solution 2. Solution 2 Because when Visual Studio is compiling the application it will try to look for the file sgen.exe in C:\WINDOWS\Microsoft.NET\Framework\v3.5, which the folder does not contain the file sgen.exe, it will failed. A simple solution is to copy the sgen.exe file into the folder v3.5 and the issue should go away. The sgen.exe file can be found in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ Here is a quick copy paste which you can put it into the DOS command window. copy /y “C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sgen.exe” “C:\WINDOWS\Microsoft.NET\Framework\v3.5\”Did you like this tip? Let's hope this will help you. Happy Programming.
Comments (4)
"
|