The .NET Client throws an exception when you try and run it in Git Bash.
Steps to reproduce
Build and run the .NET Client in Git Bash
Observe that you get the following error message:
Unhandled exception. System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.
Further details and cause
The full stack trace is as follows:
Unhandled exception. System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.
at System.ConsolePal.ReadKey(Boolean intercept)
at System.Console.ReadKey()
at Program.<Main>$(String[] args) in github\iris-clients\dotnet\IrisClient\Program.cs:line 26
at Program.<Main>$(String[] args) in github\iris-clients\dotnet\IrisClient\Program.cs:line 36
at Program.<Main>(String[] args)
Specifically, the Console.ReadKey() line in Program.cs is where the exception is thrown. It looks like this is incompatible with the Git Bash terminal.
Anything else worth noting
This appears to be the same issue as described in this StackExchange post. It may be sufficient to replace the Console.ReadKey() line with Console.Read(), but this will require confirmation.
Overview
The .NET Client throws an exception when you try and run it in Git Bash.
Steps to reproduce
Further details and cause
The full stack trace is as follows:
Specifically, the
Console.ReadKey()
line inProgram.cs
is where the exception is thrown. It looks like this is incompatible with the Git Bash terminal.Anything else worth noting
This appears to be the same issue as described in this StackExchange post. It may be sufficient to replace the
Console.ReadKey()
line withConsole.Read()
, but this will require confirmation.