How To Fix "There was a problem sending the command to the program." in Visual Studio
by
Doug
Updated July 22, 2010
Error: "There was a problem sending the command to the program." in Visual Studio
Open just a Visual Studio Shortcut as Administrator.
While using my new Windows 7 64-bit computer, with Visual Studio 2010 running as Administrator, I began getting the following error while trying to open up individual c# files or asp.net files in VS2010: "There was a problem sending the command to the program." I would get this error whether I was trying to open files with Visual Studio 2008 or Visual Studio 2010.
Essentially, to get around this error in Windows 7, you will want to turn off or uncheck "Run this program as an administrator" within the Compatibility tab for Visual Studio 2010 (or 2008). To do this:
- Right-click on Visual Studio application or shortcut
- Click Properties and then click the Compatibility tab.
- Unchecked "Run this program as an administrator" and click OK.
If you still want to open Visual Studio automatically as Administrator so you can run a project with IIS7 support, you can actually set certain shortcuts to open Visual Studio as Administrator. This means that unless you use your prefered short-cut, Visual Studio will not open as Administrator when Visual Studio is run, so you won't have to deal with the "problem sending the command to the program" error on most occasions. See how to do this below in step 2:
VS version is actually irrelevant to the error, I believe. I get it in VS2008 and it's more of an issue with Windows 7 security than VS itself.
1. There is a specific application installed on the system when you have more than one version of VS installed on a machine called "Visual Studio Version Selector" (VSLauncher.exe - http://processlist.com/info/vslauncher-2.html).
VS2010 is probably set to always run with Admin privledges (right-click exe and go to properties, within the compatibility tab there's a "Run as Administrator" checkbox). If so, then VSLauncer.exe must also run with administrative privledges or else you're running into security issues. As an attempt at explaining:
You double click a file, Windows recognizes that this needs to be run with VSLauncer, VSLauncher runs with user-level permissions, VSLauncher tells VS2010 to load the file with regular user-level permissions, VS2010 wants admin privledges... Uh oh.
2. My prefered solution. Disable "Run as Administrator" from the Compatibility tab within the properties on the executable for VS2010. Create a shortcut on your desktop or menu (whatever) that you can use to boot this with elevated permissions. On the shortcut right-click and go to Properties. Within the Shortcut tab, click Advanced to bring up a new dialog box. In this dialog box there is an option to run the shortcut itself under Administrative permissions.
The second solution above is definitely my new prefered solution/ workaround to fix this Visual Studio / Windows 7 error "There was a problem sending the command to the program." Thanks to Bill Blum and his post here.
Also see: How to Run Visual Studio.NET Automatically as an Administrator