Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, March 25, 2014 3:28 PM
Hi,
I have recently downloaded and installed Visual Studio 2013 Express for Windows Desktop from Microsoft Dreamspark. The installation was successful . I tried to compile a c# program in Developer command prompt for VS2013 but I got an error message stating that "cannot determine VS common tools folder" . How to fix this ? Please post detailed steps to fix this problem.
Regards,
Ganesh.
All replies (11)
Wednesday, March 26, 2014 8:28 AM âś…Answered | 1 vote
Hi Ganesh Prasanna,
The problem is that the bat uses de reg command and it searches that in the PATH system variable. Somehow you have managed to get "C:\Windows\System32" out of the PATH variable, so just go to the system variables (right click "My Computer" > "Properties" > advanced config > "Environment Variables", search the PATH variable and add at the end separated by ";" : C:\Windows\System32
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Saturday, March 29, 2014 7:58 AM
Thank You.. Now the problem is solved and I could use the command prompt for compiling my programs.
Sunday, July 20, 2014 7:42 AM | 1 vote
Hi, seems this has been answered but I'm getting the same error and the PATH contains "c:\windows\System32". As you can see it's the first entry...
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\C:\Program Files (x86)\Windows Kits\8.1\Windows Perform
ance Toolkit\C:\Program Files\Microsoft SQL Server\110\Tools\Binn\C:\Program F
iles (x86)\Microsoft SDKs\TypeScript\1.0\C:\Program Files\Microsoft\Web Platfor
m Installer\C:\Program Files\Microsoft SQL Server\120\Tools\Binn\C:\Program Fi
les\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\C:\Program Files (x86)\
Microsoft SQL Server\120\Tools\Binn\ManagementStudio\C:\Program Files (x86)\Mic
rosoft SQL Server\120\Tools\Binn\C:\Program Files (x86)\Microsoft SQL Server\12
0\DTS\Binn\C:\Program Files\Microsoft SQL Server\120\DTS\Binn\
This is on a new win 8.1 vm running VS 2013 Pro with update 2, SQL Server 2014, and a few other MS tools. But there's not much been installled just dev tools. Either way the path looks correct
Any other possible causes of this error?
tia
steve
Sunday, August 31, 2014 5:36 PM
Howdy, I am getting the same error and also have tried hard-coding "C:\Windows\System32" in the PATH. When the Visual Studio command-line opens, the error appears:
ERROR: Cannot determine the location of the VS Common Tools folder.
I am able to run 'reg /?' from that command-line without trouble. I am running from a new install of x64 Windows 8.1 Pro with all updates and Visual Studio Professional 2013 Version 12.0.30723.00 Update 3.
Does anyone have an idea of how to resolve this?
Thanks a bunch!
-Robert
Sunday, August 31, 2014 5:53 PM | 1 vote
I just noticed what the problem is and have found the fix.
Even though I have only VS2013 installed, I accidentally started a VS2012 x64 Cross Tools Command Prompt. The fix is to use the VS2013 x64 Native Tools Command Prompt.
-Robert
Thursday, October 2, 2014 6:57 PM
Both tools return the same error for me... and I have the proper path variable.
Wednesday, February 18, 2015 3:15 PM
I ended up just hardcoding the paths to the required vars unfortunately. I spent a bunch of time chasing the daisy chain that is microsoft's bat files and got nowhere.
I also compared against a computer whose DevCmdPrompt works, and he didn't have any extra path variables or registry keys either. So I'm at a loss. For reference, this is what I added (make sure you comment out the functions below as well):
@SET VSINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\
@SET VCINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\
@SET FrameworkDir32=%windir%\Microsoft.NET\Framework\
@SET FrameworkVersion32=v4.0.30319
@SET Framework35Version=v3.5
@SET Framework40Version=v4.0.30319
::@call :GetVSCommonToolsDir
::@if "%VS120COMNTOOLS%"=="" goto error_no_VS120COMNTOOLSDIR
::@call "%VS120COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
Monday, March 23, 2015 4:33 AM | 5 votes
I had the same problem with a fresh install of Visual Studio 2013 on a new Windows Server 2012 R2 machine.
I noticed that what I had after the Visual Studio 2013 install was 3 start menu shortcuts under the heading "Microsoft Visual Studio 2012".
"VS2012 ARM Cross Tools Command Prompt"
"VS2012 x64 Cross Tools Command Prompt"
"VS2012 x86 Native Tools Command Prompt"
I had just installed VS2013 so I'm not sure why it produced VS2012 shortcuts.
These shortcuts referenced bat files under the "Program Files (x86)\Microsoft Visual Studio 11.0" directory.
Note that VS2012 is V11.0 and VS2013 is V12.0 (can be a little confusing).
I renamed the shortcuts from "VS2012..." to "VS2013..." and updated the referenced directories to "Program Files (x86)\Microsoft Visual Studio 12.0" and they are working now.
Friday, November 27, 2015 4:39 PM
^^ This is the solution. Thank you Michael.
Monday, February 13, 2017 9:08 AM
I had VS 2013 and VS 2015. I had installed Update 5 and my command prompt stopped working. Thanks it resolved my issue.
Monday, August 7, 2017 10:04 AM
I had the same problem with a fresh install of Visual Studio 2013 on a new Windows Server 2012 R2 machine.
I noticed that what I had after the Visual Studio 2013 install was 3 start menu shortcuts under the heading "Microsoft Visual Studio 2012".
"VS2012 ARM Cross Tools Command Prompt"
"VS2012 x64 Cross Tools Command Prompt"
"VS2012 x86 Native Tools Command Prompt"
I had just installed VS2013 so I'm not sure why it produced VS2012 shortcuts.
These shortcuts referenced bat files under the "Program Files (x86)\Microsoft Visual Studio 11.0" directory.
Note that VS2012 is V11.0 and VS2013 is V12.0 (can be a little confusing).
I renamed the shortcuts from "VS2012..." to "VS2013..." and updated the referenced directories to "Program Files (x86)\Microsoft Visual Studio 12.0" and they are working now.
+1
Can't believe this isn't fixed. VS2013 is still heavily used, thought this would've been picked up years ago.
Thanks for great description of process and the fact you have a fresh install of 2013, confirmed my own problem succinctly. I'd found installutil but was reluctant to change the VS command prompt shortcuts, this gave me the confidence...