I am trying to figure out how to install Doug Finke's PSharp add-on into PS ISE.
I downloaded the zip file from github & it contains a number of .ps1 files in a couple of different directories. Tried adding just the psharp.ps1 file contents to the end of my Microsoft.PowerShellISE_profile.ps1 file & it did add PSharp to the add-on's drop down menu but it also threw a bunch of errors in the console window when I opened ISE. Do i need to add the contents of the other 12 .ps1 files to my ISE profile?
Any tips/advice would be most appreciated.
It looks like as long as ConvertTo-PSCustomObject.ps1 , Edit-Live.ps1, and New-FunctionFromSelectedText.ps1 are in the same directory as your profile script, what you did should work okay. The first few lines of psharp.ps1 try to dot source those scripts from its current directory. Rather than copying the contents of psharp.ps1 into your profile, though, you should probably just dot source it. That way you can download updates without having to recopy it into your profile.
# Microsoft.PowerShellISE_profile.ps1 . C:\Path\To\psharp.ps1
I'm not sure what the purpose is for the other ps1 scripts in the "spike" folder of the git repository. They don't seem to be used right now.
Thank you for the info, works like a charm!
You must be logged in to reply to this topic.