Packaging Support for Self Contained PowerShell 7 Applications
The PowerShell script packager now supports creating PowerShell 7 self-contained applications. Follow the below tutorial on how to create your own stand-alone applications with PowerShell Pro Tools.
PowerShell 7 Preview
.NET Core 3.0 Preview SDK
PowerShell Pro Tools for Visual Studio Code
Bundling an application with PowerShell 7
In Visual Studio Code, open the script you would like to package. Ensure that you have PowerShell 7 selected as the current PowerShell session.
Once you have the script open and PS 7 running, run the Package Script command. You will see packaging information written to the Terminal pane.
After running the packaging process, you’ll have a single file that contains your script as well as the PowerShell 7 runtime.
You can execute that application anywhere; even if PowerShell 7 isn’t installed.
One neat thing about PowerShell 7 is that it supports Windows Forms and WPF. Try using the Windows Form Designer in Visual Studio Code and then packaging the script with PowerShell 7.
Fixed issue with packager in Visual Studio Code
The packager would throw an error it was executed with no folder open. The packager now works if only a PS1 file is open.
Fixed bug with Form Designer
When a non-control component, such as an ImageList or a Timer, was added to the form, the form designer would no longer function.
Error about Avalonia module
The module was still attempting to load the PSAvalonia module even though it has been moved out of PowerShell Pro Tools.
Error when packaging PowerShell Core
An error would be thrown while attempting to package a PowerShell Core application.