1

I have recently installed Visual Studio Community 2013 with update 4 and when I try to build my project I get these errors(see below):

C:\Program Files(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(362,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
1>  main.cpp
1>c:\program files (x86)\microsoft sdks\windows\v7.1a\include\sal_supp.h(57): warning C4005: '__useHeader' : macro redefinition
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2886) : see previous definition of '__useHeader'
1>c:\program files (x86)\microsoft sdks\windows\v7.1a\include\specstrings_supp.h(77): warning C4005: '__on_failure' : macro redefinition
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2896) : see previous definition of '__on_failure'

How to solve them? I tried many ways but no luck.

rvmod
  • 29
  • 1
  • 5

1 Answers1

0

Go to control panel and go to uninstall program.

uninstall

Choose your visual studio community edition update 4. Select change or repair, if it's there. If it opens to the Visual Studio window then select repair there.

controlPanelChoice

Select repair.

VSRepair

Keep your internet connection on while you do this, so your sdk and platform tools can be updated.

If this doesn't work, there are some links to altering the registry:

https://stackoverflow.com/a/24478856/3956566

https://social.msdn.microsoft.com/Forums/vstudio/en-US/48a4500c-2c48-43dd-822b-10e83258d18b/warning-msb8003-could-not-find-windowssdkdir-variable-from-the-registry-targetframeworkversion-or?forum=visualstudiogeneral

How to set SGEN toolpath in Msbuild to target 3.5 framework

https://code.google.com/p/gyp/issues/detail?id=457

Community
  • 1
  • 1