Loading PowerShell types into VSCode

VSTeam uses SHiPS to create a PowerShell provider. Each time I work with the classes I see red squiggles under the types provided by SHiPS. If you hover your mouse over the code you see the type could not be found.

image

One way that I found (with the help of Steven Murawski of the League) to load the types is to start an interactive console debug session and import the modules that contain the types.

image

With the debug session running import the module.

image

Now you can stop your debug session and close and re-open any files showing red squiggles and they should be gone.

image

Comments (1) -

  • This is great but even greater would be that VSCode could resolve types as with ISE - hope we will get there eventually.

Add comment

Loading