I have a forms application which runs OK in VSCode and PowerShell_ISE
When packaged with
PowerShellCore = $true
DotNetVersion = ‘netcoreapp31’
PowerShellVersion = ‘7.0.0’
Forms display OK, calls a function which has File Browser/Picker, Out-GridView works OK.
However, when packaged, the above all work but Out-GridView throws this error
Attempt by method ‘Microsoft.Management.UI.Internal.InnerListColumn…ctor(Microsoft.Management.UI.Internal.UIPropertyGroupDescription, Boolean, Boolean)’ to access method ‘System.Management.Automation.Internal.GraphicalHostReflectionWrapper.EscapeBinding(System.String)’ failed.
The Grid-View window shows, but just has blank with spinning circle.
I have in the code:
Add-Type -AssemblyName System.Windows.Forms -Verbose
I tried with/without the following:
Add-Type -AssemblyName System.Management.Automation -Verbose
Any clues/tips for resolution, understanding if there are missing dependences, gratefully accepted?