VS: PowerGui Vsx

There is a PowerGui plugin for VisualStudio.

Currently on the download page latest version is PowerGUI VSX 1.5.5 Requires PowerGUI 3.2

But the latest version PowerGui is 3.5.0.2293. That version makes the vsx fail, when trying to open a .pssproj project file.

A workaround to fake PowerGui version 3.2:

Change in registry (do that by hand since the place is user specific). Change from:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\7954EF75A505E6B43A4F29B46702BD32\InstallProperties]
"DisplayVersion"="3.5.0.2293"
"VersionMajor"=dword:00000003
"VersionMinor"=dword:00000005

Change to:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\7954EF75A505E6B43A4F29B46702BD32\InstallProperties]
"DisplayVersion"="3.2.0.1"
"VersionMajor"=dword:00000003
"VersionMinor"=dword:00000002

Now you should be able to create and edit a project of type PowerShell Script project (.pssproj)
Disclaimer: Changing in registry is on own risk.

 

If you need to run PowerGui with SharePoint2010 or older (.NET 3.5) then you need to edit the config file of PowerGui according to Avni Bhatt’s article.

In C:\Program Files (x86)\PowerGUI\ScriptEditor.exe.config comment out one line:

<!–- <supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″ /> -–>

If not changed, then you get the exception: “Microsoft SharePoint is not supported with version 4.0.30319.269 of the Microsoft .Net Runtime.”

The End

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: