I have several console applications written in .NET 7.0. The nature of these applications are to function as a CLI that takes input from the user and executes some functionality. In all of these CLI applications, I make use of Spectre.Console to get input from the user.
For the last few months everything worked good, but the last few days I realised I can't run/debug the applications in Rider anymore. Normally when I ran the application, my Debug window would open with the CLI prompting me in the Console tab, but now, when I run the CLI in rider, the debug window opens with the Console tab as expected, but I continuously get the following exception:
System.InvalidOperationException: Failed to read input in non-interactive mode.
at Spectre.Console.DefaultInput.ReadKeyAsync(Boolean intercept, CancellationToken cancellationToken) in /_/src/Spectre.Console/Internal/DefaultInput.cs:line 36
at Spectre.Console.AnsiConsoleExtensions.ReadLine(IAnsiConsole console, Style style, Boolean secret, Nullable`1 mask, IEnumerable`1 items, CancellationToken cancellationToken) in /_/src/Spectre.Console/Extensions/AnsiConsoleExtensions.Input.cs:line 22
at Spectre.Console.TextPrompt`1.<>c__DisplayClass63_0.<<ShowAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Prompts/TextPrompt.cs:line 133
--- End of stack trace from previous location ---
at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in /_/src/Spectre.Console/Internal/DefaultExclusivityMode.cs:line 40
at Spectre.Console.TextPrompt`1.ShowAsync(IAnsiConsole console, CancellationToken cancellationToken) in /_/src/Spectre.Console/Prompts/TextPrompt.cs:line 122
at Spectre.Console.TextPrompt`1.Show(IAnsiConsole console) in /_/src/Spectre.Console/Prompts/TextPrompt.cs:line 111
at Spectre.Console.AnsiConsole.Ask[T](String prompt) in /_/src/Spectre.Console/AnsiConsole.Prompt.cs:line 32
at Program.<Main>$(String[] args) in /Users/markarrow/git/LoopBuilder/ModularLoopBuilder/Program.cs:line 70
at Program.<Main>(String[] args)
What I gather from this is that the terminal in Rider is not running in interactive mode anymore. For other members in my team (Who also use Rider), this still works, so I don't think it is anything to do with my code itself.
Note: I also see the colors in my terminal looking rather pale. No color formatting my output anymore. I assume this is also the because of my terminal mode.
I think somehow I turned off interactive mode for my terminal in Rider?
I tried searching for the exception on google, but I keep getting Nuget related results and no real way to fix my Rider terminal.
I also tried looking some interactive mode related settings for Rider, but then end up getting results for C# Interactive window, which is also not what I need.
Lastly, I tried comparing my settings with those of my team, but see no difference. Maybe there is something I am missing?
For completeness sake, I am running Rider on an M1 Macbook.
Is there some shortcut or some setting that I need to turn on/off so that I my Rider terminal is running in interactive mode again?
Any help would be much appreciated, thanks!