Closed eiredrake closed 4 years ago
I assume you are running on Windows? Which shell do you use for the terminal in VS Code?
Had to pull it up but looks like the default on my system is powershell and yes, windows. Just tried it with the cmd and same effect.
Additional info:
Tried another console progressbar. Same exact thing happened.
Also noted that running the app in either a command window or powershell works just fine. It only crashes when you run in inside VS code. Presumably there's some sort of difference in the way it handles consoles or something.
Closing this because it seems the terminal emulator in VS Code seems to have caught up.
Keep an eye on new release (>4.3.0) and let me know if the problem persists.
Thanks for reporting this one @eiredrake
Pretty sure this is caused by the differing environment that VS code offers but the following code works in visual studio as a core 2.2 console app just fine. But opening it up in VS Code it crashes immediately on the using ProgressBar line.
The exception message is:
Exception has occurred: CLR/System.IO.IOException An unhandled exception of type 'System.IO.IOException' occurred in System.Console.dll: 'The handle is invalid' at System.ConsolePal.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded) at System.Console.get_CursorTop() at ShellProgressBar.ProgressBar..ctor(Int32 maxTicks, String message, ProgressBarOptions options) at DataTableTest.Program.Main(String[] args) in C:\Users\ekramer\Documents\VS Code Projects\DataTableTest\Program.cs:line 24
At this point theirs probably nothing that can be done until VS code matures a bit more but I figured I'd let you guys know so that people using VS code won't be surprised when this happens. Like I said it works just fine in Visual Studio.