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
Visual Studio 2017 and PSTools 5.7.1.
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:
Thanks for the info. Sorry I didn’t notice this question sooner. We’ll get this fixed.