Why does PowerShell ISE hang on this C# program? -
if compile c# code exe file , run in windows command shell runs fine: outputting prompt, waiting on same line user input followed enter, echoing input. running in powershell v3 shell runs fine. if, however, run same exe file in powershell ise v3, never emits output write
, hangs on readline
. (as aside, emit output write
if later followed writeline
.)
namespace consoleapplication1 { class program { static void main(string[] args) { system.console.write("invisible prompt: "); var s = system.console.readline(); system.console.writeline("echo " + s); } } }
is ise bug or there property adjust make work...?
the ise has no support console
class.
- no support [console] class, try [console]::backgroundcolor = 'white'.
- in general, scripts should use host api's (write-host, instead of [console] class, work in both console, ise, remoting , other shells.
Comments
Post a Comment