Created a simple WinForm and it runs as expected but in the output window there is an annoing error because there is no variable ‘$base’ in the PSScriptRunner.designer.ps1 file:
Add-Member -InputObject $PSScriptRunner -Name base -Value $base -MemberType NoteProperty
Looks like I can answer my own question.
This is the line that is causing the issue because setting strict throws an exception if the variable is not defined:
Set-StrictMode -Version Latest
This hides the exception but IMHO the application should be fixed: