Problem with PowerShell Pro Tools in Visual Studio 2019

Has anyone ever run across this issue before?

I’ve installed the trial license for PS Pro Tools in VS 2019 and followed the documentation to create a WPF form. Two of my buttons open a file browser to select a file to upload. A third button is a submit function and I’ve got 3 text boxes.

When I hit F5 or Ctrl+F5, Visual Studio will flicker like it’s starting the app and then immediately stop with the Debug output showing “The program ‘main.xaml.ps1: PowerShell Script’ has exited with code 0 (0x0).”

I’ve tried uninstalling and reinstalling and creating new PowerShell Script projects but it always does the same thing. If I create the same GUI using the WPF project it starts up just fine.

I’ve also created a new project, added the PowerShell WPF Window and hit F5. Same thing.

A little more info:

  • The PS version I’m trying to use is 7.0.3.
  • When I add the PowerShell Tools menu and choose a version, nothing ever shows up and the box stays blank (after locking up Visual Studio for a minute or two).

Does anyone have any ideas?