ERROR: Cannot determine the location of the VS Common Tools folder.

When you get this error … something got really broken. I do not know the reason how I got this error – but actually an installation of some development tools are the reason for this ….

Microsoft looks for the location of its tools by looking at the env variable “VS100COMNTOOLS”. In my case this env variable is set, BUT starting a VS2010 command shell fails to set this variable – because the Microsoft script unset the variable first and then query the registry for the installation path and set it again.

To query the registry it uses the command “reg” and “reg” is located in c:\windows\system32. But this directory is NOT defined in the PATH variable content any more and therefore reg is not found.

The not finding of “reg” creates an error and VS100COMNTOOLS remains unset and the whole stuff is not working any more.

Therefore the missing of “c:\windows\system32” in PATH is the reason for all these errors – but I still do not know, which tool installation broke that stuff.

Advertisement
This entry was posted in .NET and tagged . Bookmark the permalink.

37 Responses to ERROR: Cannot determine the location of the VS Common Tools folder.

  1. Amit Jain says:

    Hi,
    I was getting same problem.
    But after reaching to your post. I have resolved the issue.

    Thank you very much. 🙂

  2. Christopher Cook says:

    I had the same error – the only item I had in my path was to quick time!

  3. Jack says:

    THANK YOU! I HAD EXACTLY THE SAME PROBLEM AND YOUR POST SAVED ME! THANK YOU A MILLION TIMES!

  4. Dmitri says:

    Does anyone know why this happens?

  5. vishal says:

    setting path variable to c:\system\windows\system32 solves the issue …..

    thanks yaar

  6. Milind Kolekar says:

    Thanks – You just saved a few hair on my head.

  7. Justin says:

    Thank you so much, this just resolved a whole bunch of problems I was having

  8. Derek Warren says:

    Can someone share where this path should be updated? I tried adding it to vcvarsall.bat, on line 170, like so:

    @set PATH=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\VC\VCPackages;C:\windows\system32;%PATH

    But to no avail. Same issue continues.

    Thanks in advance for any ideas/direction.

  9. C0 says:

    I got the same error today. The cause is that I uninstalled the preview VS2011, apparently the uninstaller messed things.

    I fixed it by adding values manually under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS in registry on a Win64:
    FrameworkDir32 = D:\Windows\Microsoft.NET\Framework\
    FrameworkDir64 = D:\Windows\Microsoft.NET\Framework64
    FrameworkVer32 = v4.0.30319
    FrameworkVer64 = v4.0.30319

  10. Robert says:

    I got this also, when trying to use the compiler suite that comes with the 7.1 SDK. And I don’t have the path issue 😦

  11. LL2 says:

    Man, i just wish Microsoft could get their crap togeather!

  12. Ashok Thakur says:

    hi,
    i was getting the same problem. But after reading your post, my problem is resolved…
    Thank you very much 😉

  13. Josh says:

    Fixed it for me too, thank you!

  14. I got this error after installing (install other stuff) Windows Live Movie Maker (Windows Live Tools). May be windows installer got without buffer space to copy previous PATH string and so lost the last folder that was set. If this is true, the install any other windows software that change the PATH var, may broke it again.

  15. sasi says:

    Thanks a lot

  16. bob says:

    This is a great post! Thank you!

  17. JJACK says:

    This worked for me ! Thank you so much!

  18. arihant says:

    hi , i am in the process of building a wireshark dissector.i am not able to use “nmake” which shows the error (as d name of your article).i’ve put c:/windows/system32 against path env var.should i add VS100COMNTOOLS as an env var and assign the address?plzz help…

  19. All says:

    Your tip was great.
    In prompt: path=path;c:\windows\system32 and then “voilà”.
    Thanks

  20. the_nuke says:

    thanks a ton …!!!

  21. Nikhil Mehta says:

    Had the same problem. Thanks a lot.

  22. Rhys says:

    I’ve just installed python(x,y) and found that it was responsible for altering the PATH variable that caused this problem on my Win 7 64-bit machine.

  23. Lawrence says:

    Thanks a lot…that was a simple fix!!!

  24. Tyrant917@yahoo.com says:

    Saved my butt. Thanks.

  25. noname says:

    You saved my day. Happy New Year !

  26. ST says:

    Finally this really worked.
    My cl compiler was running fine until I set up the environment for adt bundle SDK eclipse. Then, I spent so much time searching for solution but none fully helped.

    Thank You Very Much

  27. Anup kumar says:

    thanks dude .. I had also facing same problem ..

  28. PenelopeLin says:

    it works for me,thanks alot!

  29. Suraj Khurana says:

    Solved! thanks !

  30. Thomas says:

    Also solved my problem. Couldn’t get qt creator to compile. The error running vcvarsall.bat x86_amd64 that qt runs did not show in qt creator (somehow suppressed).

  31. chris leong says:

    Help, I still couldnt get my vsvar32.bat to work. Ive already added that value into my path env var but it still can’t find the folder!

  32. ringerc says:

    With VS 2013 community update 5 this can be an issue where for some insane reason it installs the VS 2012 command prompt entries instead. These obviously won’t work since VS 2012 isn’t installed. See the 2nd-last post on:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/78703f6b-f610-456c-b770-76a12be3e1ae/error-cannot-determine-the-location-of-the-vs-common-tools-folder?forum=vssetup

    You have to edit the shortcuts. Rename them from VS 2012 to VS 2013, and change the vcvars paths from ’11’ to ’12’.

  33. tai says:

    thank you so much

  34. sdev says:

    iam gettinng same error i did same like above i add “c:\windows\system32” but again iam getting
    same error this is my path=C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Windows\System32;

  35. Pingback: VS2010 command prompt gives error: Cannot determine the location of the VS Common Tools folder - PhotoLens

  36. Pingback: VS2010 command prompt gives error: Cannot determine the location of the VS Common Tools folder – Row Coding

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.