I had a problem when migrating to .net 4.0 that gave the following error when trying to build.

 C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1917,9): 
  error MSB3086: Task could not find "LC.exe" using the SdkToolsPath "" or the 
  registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A".

 Make sure the SdkToolsPath is set and the tool exists in the correct processor 
 specific location under the SdkToolsPath and that the Microsoft Windows SDK is
 installed 

 External Program Failed: C:\windows\microsoft.net\framework\v4.0.30319\MSBuild.exe
 (return code was 1)

The latest version of the microsoft windows sdk is installed on the machine but the version is v7.1. To fix the problem I put the following point the registry key at

   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\InstallationFolder 
 to C:\Program Files\Microsoft SDKs\Windows\v7.1\. 

This worked however I feel a little dirty about pointing the 7.0A registry key to the 7.1 installation. Does anyone have a better solution to this problem?

c#
Edit
Report