The code is:
Console.WriteLine("Hello, World!");Console.ReadKey();
And it gives me this error:
Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read
The code is:
Console.WriteLine("Hello, World!");Console.ReadKey();
And it gives me this error:
Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read
When creating a new Project in Visual Studio, make sure to select a Console Application Type as your Project Template.
It is possible to change the Project Type after creating a Project through the Project Properties, but since it looks like you are starting from scratch, you might want to restart with a new project template.
We can found answer in OmniSharp Visual Code docs: https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
You can also refer to this page: ReadKey not working in .net core