Problem setting PowerShell in Options dialog

Topics: User Forum
Nov 4, 2006 at 2:09 AM
I am trying to use this plugin and use PowerShell as the default shell. I followed the instructions and did the following:

1. Selected Tool...Options menu item.
2. Selected PowerToys.
3. In the Shell Selection dropdown I selected <Browse for more...> and navigated to the Microsoft.VSPowerToys.VSCmdShell.PowerShellHost.dll assembly.

I get an error stating that the assembly could not be loaded. Errors was: \nAssembly could not be loaded because of an unknown error.

I am using Windows PowerShell 1.0

Thanks for the help.
Nov 4, 2006 at 8:09 PM
I have created the issue 5175 ( for this problem.

Because of changes in RC2, VSCmdShell is no longer compatible with the most recent version of PowerShell. If you want to continue to use PowerShell with VSCmdShell, you should use PowerShell RC1.

May 2, 2007 at 6:07 PM
Wow this is old. :(
May 2, 2007 at 8:00 PM

That issue should be resolved in the source and very soon we will be releasing VSCmdShell 1.2 that should contain the fix. It would be great help to us if you can download source code and build the latest version to try if VSCmdShell now works with latest version of PowerShell on your system as well.

May 3, 2007 at 7:32 PM
It works, thanks. (Running Windows Server 2003 R1 SP2 w/ PowerShell RTM reinstalled.)
May 16, 2007 at 12:29 PM
I am experiencing the same issue on 1.2.
I am running VSCmdShell 1.2 and
Power Shell 1.0 (XP WindowsXP-KB926139-x86-ENU.exe )

I have been unable to Power Shell RC1, the pages seem to been removed
May 16, 2007 at 5:03 PM

Joel wrote:
I am experiencing the same issue on 1.2.
I am running VSCmdShell 1.2 and
Power Shell 1.0 (XP WindowsXP-KB926139-x86-ENU.exe )

I have been unable to Power Shell RC1, the pages seem to been removed

Joel -

I'm sorry for the trouble that you're experiencing. I have confirmed that the 1.2 release of VSCmdShell does in fact reference the wrong version of the System.Management.Automation assembly (which contains the PowerShell-related classes).

With any luck, a new build will be available soon and that would be your best bet for resolution to this issue. If you can't (or don't want to) wait, your next best option is to get and build the source. Finally, if neither of those options is attractive to you, you can add a "bindingRedirect" element to the app.config file for Visual Studio 2005. I don't recommend this third option, and hope it will be used only as a last resort. If you chose to do so, you can add the following to devenv.exe.config (typically located in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE):

	<assemblyIdentity name="System.Management.Automation" publicKeyToken="31bf3856ad364e35" culture="neutral" />
	<bindingRedirect oldVersion="1.0.9567.1" newVersion=""/>

The dependentAssembly element should be nested inside of the configuration/runtime/assemblyBinding element.
May 17, 2007 at 10:24 AM
Will wait for a new build thanks.
Jun 21, 2007 at 9:06 PM
Hi Joel, as it is a month and no new release coming, I've just downloaded the code, compiled, closed all VS instances and copied Microsoft.VSPowerToys.VSCmdShell.PowerShellHost.dll from the compiled project to the Program Files\Power Toys for Visual Studio\VSCmdShell.

This resolved the problem, I think guys are busy :):)...

Sep 3, 2007 at 2:50 PM
Hi Stan,

How did you get it to compile? I don't have a lib directory under "Windows Installer XML\bin" and so the build cannot find wixui_featuretree.wixlib.

Where did you find these files as I have downloaded the WIX MSI file and Binaries ZIP, and neither contain it.

Sep 3, 2007 at 7:50 PM
Thinking a couple months retrospectively... umm.. I think I removed the WiX references since I wasn't trying to run the installer but was going to xcopy the DLLs. I'd had WiX installed but it was a different version. StoneFree, if you can manage to clean that out you should be able to get it to compile for you.