Error 8 Task failed because "sgen.exe" was not found

Error 8 Task failed because "sgen.exe" was not found

最近開發一些 Class Library 給團隊的人員使用,而 Class Library 的原始碼都會放在 Subversion 上做版本控制。最近,團隊有位成員心血來潮將將原始碼 Check Out 出來想幫我修改一些程式碼,卻是編譯的過程中發生了奇怪的錯誤訊息。

錯誤訊息如下【Error 8: 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.

我們的作業環境都是使用 Windows XP Professional With SP2,開發環境為 Visual Studio 2008 Professional,僅僅差在我的電腦上面另有保留 Visual Studio 2005 Team Suite。後來上網 Google 了一下,原來真的是少了 "sgen.exe" 檔案。所以,把我電腦中【C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\】路徑下的 "sgen.exe" 複製到他電腦【C:\WINDOWS\Microsoft.NET\Framework\v3.5\】路徑,問題就迎刃而解了。

但是,我一直搞不懂為什麼就只有他的電腦不行咧?為什麼會出現這種問題咧?