◐ Shell
clean mode source ↗

Changes to build analyzer for PS7 and PS6 and ship in separate directories and bump version to 1.19.0 by JamesWTruher · Pull Request #1425 · PowerShell/PSScriptAnalyzer

Basically the outcome of our discussion was:

  • Use SMA for just parsing, minimal hosting using SessionState.CreateDefault2() and only commands in the Microsoft.PowerShell.Core module, or when you need a reference assembly with version-specific APIs
  • Use the SDK for hosted scenarios where arbitrary commands or modules may be used or where code references are required to other Microsoft.PowerShell.* module types
  • Use PSStd for all reference (rather than hosted) scenarios where version-specific APIs are not required

Basically PSStd is a facade with no implementation, but it's a common denominator facade so omits version-specific APIs.

SMA is just the engine DLL, so doesn't come with the whole of what ships today as "PowerShell". It's enough to parse and run very basic PowerShell scripts, but doesn't have the modules or other required bits like the refs folder needed for Add-Type.

The SDK is the whole circus, with everything needed to run PowerShell just like pwsh.exe. But if you're just trying to compile against PowerShell as a module, it's probably overkill.