PowerShell inside Visual Studio works perfectly but not in ISE and executable

Hi everyone,

I writing a windows form script inside Visual Studio with PowerShell tools.
When i press Launch inside Visual Studio, everything works fine.
However, if i try to launch the ps1 outside of Visual Studio or package it as an executable,
nothing work, the app open correctly but the button dont do anything.`
Tried launching as admin and having the same issue.

One of the button is
Invoke-item (path to .html file)
Works perfectly in visual studio but outside nothing happen.
Any idea ?

Thank you

Tool: Visual Studio
PowerShell Module
Version: Latest

Hi Cheyou,

It sounds like there could be difference between the environments. Could you please share a more complete example code which demonstrates the problem? If we can isolate this, I am sure we can resolve it.

1 Like

So after you wrote this, i went back and checked a lot of my code and you were right again. Thank a lot now its fixed.

1 Like