Compiling PowerShell 7 Scripts into a Executable in VS Code

We just (re)released support for packaging scripts in PowerShell 7. It works cross-platform.

Adam, I can see the new value for DotNetVersion value (netcoreapp31) in Package table. Also there is a new key ‘PowerShellVersion’. What are the valid values for both?

Besides, will I now be able to bundle the Powershell Core runtime within the executable when specifying PowerShellCore = $true? That wasn’t working properly before.

Please advise.

The valid values are listed here: https://docs.poshtools.com/powershell-pro-tools-documentation/packaging/package.psd1#config-file-schema

To compile for PS7, you will need to set:

PowerShellVersion = ‘7.0.0’
DotNetVersion = ‘netcoreapp31’