Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone found a PowerShell Syntax highlighting or IntelliSense plugin for Visual Studio? [closed]

Has anyone found a plugin for Visual Studio to allow for PowerShell syntax highlighting or IntelliSense? If not, does anyone have any idea why not? I keep hoping someone else with copious free time would have tackled this by now. I have hope since other folks have managed to take the limited documentation and build custom IntelliSense providers for other languages such as NHaml.

Edit: To clarify,I'm not looking for a list of IDEs that can be used to develop PowerShell . I spend 90% of my day in Visual Studio. It already does a really good job of slicing and dicing code. That is the IDE I prefer to use to edit all text and code. The lack of PowerShell syntax highlighting now that I work with PowerShell scripts is down right painful.

like image 650
Brian Adams Avatar asked Nov 07 '08 05:11

Brian Adams


People also ask

How do I get the PowerShell terminal code in Visual Studio?

In Quick Open, type ext install powershell and press Enter. The Extensions view opens on the Side Bar. Select the PowerShell extension from Microsoft. Click the Install button on the PowerShell extension from Microsoft.

How do I run PowerShell in Visual Studio?

The integrated environment is the only configuration that runs within Visual Studio. All other configurations run in external PowerShell processes. You can open the interactive window by pressing Ctrl+Shift+\ or by navigating to View \ PowerShell \ PowerShell Interactive Window.

How do I write a PowerShell script in Visual Studio code?

PowerShell Extension Once you install the extension, you can create a new PowerShell script by pressing Ctrl+N and then saving it as a PS1 file using Ctrl+S . Once it is saved as a PS1, VS Code will identify the file as a PowerShell script. From there, you can execute the PowerShell script by press F5 .


2 Answers

Update 2013-08-20

Adam Driscoll has recently announced the PowerShell Tools for Visual Studio as successor of his former PowerGUI Visual Studio Extension - see his blog post about The Future of PowerGUI VSX for details, where he acknowledges the drawbacks of the predecessor outlined by Simon Gillbee (see previous update below) and describes how they will be addressed by removing the dependency on PowerGUI:

[...] By embedding the PowerGUI editor directly in Visual Studio it caused a multitude of problems because it really wasn’t a true language integration but more like a hack.

[...] PowerGUI VSX v2 will offer true Visual Studio language support for PowerShell. It uses the Visual Studio editor and the raw PowerShell debugger, tokenizer and completion engine. Currently, the requirement is PowerShell v3 and Visual Studio 2012. This requirement may change depending on community support and adoption. [emphasis mine]


Update 2013-07-31

Simon Gillbee has just referenced/promoted a PowerShell syntax highlighting alternative, that doesn't expose the drawbacks of the PowerGUI Visual Studio Extension he previously summarized:

  • TextHighlighterExtension2012 (Visual Studio 2012)
  • TextHighlighterExtension (Visual Studio 2010)

Initial Answer

The recently released PowerGUI Visual Studio Extension adds PowerShell IntelliSense support to Visual Studio. While it depends on the (free) PowerGUI graphical user interface and script editor, reusing this editor component should be a sign of maturity rather than an impediment I'd hope. (See Kirk Munros PowerShell support in Visual Studio! blog post for an introduction.)

Being a 1.0 there are still some minor issues with the extension as such, but Adam Driscoll seems to be pretty active tackling these - the PowerShell syntax highlighting and IntelliSense support is working most excellent for me already!

like image 197
Steffen Opel Avatar answered Oct 07 '22 03:10

Steffen Opel


Here's a useful one: PowerGUI VS Extension.

like image 39
Justin R. Avatar answered Oct 07 '22 04:10

Justin R.