Share via


Visual Studio 2010 command prompt not working

Question

Saturday, May 14, 2011 11:50 PM

Hi, When I try to statart the Visual Studio Command prompt (2010) to be able to run GacUtil the command window shows

"Setting Environment for using Microsoft Visual Studio 2010 x86 tools

\Git\Cmd was unexpected at this time."

the 64 bit command window shows the same error

"Setting Environment for using Microsoft Visual Studio 2010 x64 tools

\Git\Cmd was unexpected at this time."

How can I fix these errors?

Thanks,

Mark

All replies (6)

Monday, May 16, 2011 7:44 AM ✅Answered

Hi inscharp,

Thank you for posting.

From your description, if you right-click VS2010 command prompt and select Properties, you will find the target value targets <VS installation path>\VC\vcvarsall.bat. Here’s the path on my side. %comspec% /k ""D:\VS2010\VC\vcvarsall.bat"" x86

In addition, this batch file will find different batch files according to different OS (x86, x64, IA64, etc.). In these files, you will find many environment variables in them. From your provided error information, it looks that your issue is related with environment variables. I suggest you can check if these environment variables were added in your side. The easiest way to do this is to add the %PATH%, %INCLUDE%, %LIB% and %LIBPATH% environment variables. Please check this thread for more detailed information.

Hope this helps. If you have any question, welcome to post back.

Best Regards,

Larcolais Gong[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Tuesday, May 17, 2011 4:44 AM ✅Answered | 1 vote

Hi,  I fixed the problem by removing all quotes from Path,

Thanks,Mark

 


Saturday, May 14, 2011 11:21 PM

Hi, When I try to statart the Visual Studio Command prompt (2010) to be able to run GacUtil the command window shows

"Setting Environment for using Microsoft Visual Studio 2010 x86 tools

\Git\Cmd was unexpected at this time."

the 64 bit command window shows the same error

"Setting Environment for using Microsoft Visual Studio 2010 x64 tools

\Git\Cmd was unexpected at this time."

How can I fix these errors?

Thanks,

Mark

 

 


Saturday, May 14, 2011 11:39 PM

Please ask in the forum dedicated to Visual Studio setup. This forum is for .NET Framework installation issues.

Here is the forum you need:

http://social.msdn.microsoft.com/Forums/en-US/vssetup/threads

 


Monday, May 16, 2011 7:45 AM

I will help you merging your duplicated thread into one.

Thanks,

Larcolais Gong[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Sunday, June 5, 2011 11:18 PM | 1 vote

I had the same problem, and the removal of the quote fixed it.

PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\c:\users\andrew\bin;**"**C:\Program Files (x86)\Microsoft SQL Server\100\Tools\
Binn\C:\Program Files\Microsoft SQL Server\100\Tools\Binn\C:\Program Files\Microsoft SQL Server\100\DTS\Binn\

 

Exactly why I had

C:\Program Files\Microsoft SQL Server\100\Tools\Binn\

three times, I don't know.