6
Vote

In x64 Vista and VS2008 the command shell does not launch cmd.exe

description

In the above mentioned config, the command shell is empty and does not shouw up the cmd prompt. The powershell seems to work fine. After the first command is entered it just hangs VS

file attachments

comments

bamueller wrote May 2, 2008 at 9:02 PM

I am running Windows Server 2008 (x64) and VS 2008. I can click on the VSCmdShell, but it appears empty (blank) and as soon as I press the "enter" key within the blank window, I get a fatal VS error that causes a reset.

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: devenv.exe
Problem Signature 02: 9.0.21022.8
Problem Signature 03: 47317b3d
Problem Signature 04: Microsoft.VSPowerToys.VSCmdShell
Problem Signature 05: 1.1.0.0
Problem Signature 06: 474df095
Problem Signature 07: 9f
Problem Signature 08: 19
Problem Signature 09: System.InvalidOperationException
OS Version: 6.0.6001.2.1.0.274.10
Locale ID: 1033

Additional information about the problem:
LCID: 1033

wrote May 7, 2008 at 6:20 PM

wrote May 7, 2008 at 6:28 PM

wrote May 7, 2008 at 6:57 PM

wrote Nov 21, 2008 at 3:40 AM

mattgollob wrote Feb 6, 2009 at 11:32 PM

I realize this issue is quite old, but I ran into it myself and I think I may know what the problem is. In my case, it was because I had only VS2008 installed, and when the CommandShellHost is initialized it attempts to read VS2005's InstallDir registry value when building the path to vsvars32.bat. Changing line 123 in CommandShell/CommandShellHost.cs from:

RegistryKey rk = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\VisualStudio\8.0");

to:
RegistryKey rk = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\VisualStudio\9.0");

This single change resolved the issue for me. Based on this, I don't believe that this issue is related to Vista, nor is it related to x64.

Note in the source there is a big "//HACK:" comment indicating that this logic needs refactoring. That is something I intend to do in the next few days / weeks

wrote Feb 6, 2009 at 11:33 PM

wrote Feb 13, 2013 at 10:14 PM