When you get the
following error “The tools version “4.0? is unrecognized” or for any other version, in Visual
Studio 2008, apply the following fix.
Make sure these keys are present
in the registry. If not present, add it.
This should resolve this issue.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\3.5]
"DefaultToolsVersion"="2.0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0]
"MSBuildToolsPath"="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5] "MSBuildToolsPath"="C:\WINDOWS\Microsoft.NET\Framework\v3.5\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0] "MSBuildToolsPath"="C:\WINDOWS\Microsoft.NET\Framework\v4.0.20506\"