Using dotnet-script with C# Interactive

I'm trying out Rider on Linux at the moment and I'm really liking it so far. I'm trying to get the C# Interactive window to work properly. I'm using dotnet core, and do not have mono installed. Dotnet core has dotnet-script support with will run script files or produce an interactive window. I set the path to the file, but when I run it, I get the error Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.

Is there a way to get this to work with rider? I can run it from a regular terminal window, even within Rider, it just doesn't seem to work in the C# interactive window.


The same here on windows. For a C#-beginner it is very hard to distiguish between all these C#-Frameworks and variants.

It costed me 2 hours just fo find out that i can't simply use the dotNetCore-HttpClient with the C#Interactive-Console, but have to use instead. Or better: that's my understanding at the moment ;).

It would be very helpful, if Rider would habe a better support here for the C#-Jungle.

Angelina Elycheva

Hello Thecodemonk,


Just in case you've missed this issue was fixed -

Thank you.



Angelina Elycheva

Hello gratinierer,


Could you please specify what you expect as better support? 

Thank you.


I'm trying to integrate dotnet-script with Rider on Ubuntu. Set path to /home/user/.dotnet/tools/.store/dotnet-script/0.52.0/dotnet-script/0.52.0/tools/netcoreapp3.1/any/dotnet-script.dll , but it doesnt work. Got error

/home/user/.dotnet/tools/.store/dotnet-script/0.52.0/dotnet-script/0.52.0/tools/netcoreapp3.1/any/dotnet-script.dll --
The entry point method could not be loaded due to Could not load file or assembly 'System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

Process finished with exit code 1

Is it possible to make it work on linux?


Hello Александр,


Could you clarify if you are using any dependencies in this project (#r / #load directives)? If you do, kindly share the list of dependencies.




Hi! Just open C# Interactive and immediately get the error. There is no code at all


Thank you for the information Александр


You mentioned that the path is set to dotnet-script.dll. I want to note that path in Rider's tool settings for C# Interactive should point to the following location when using dotnet-script if the tools was installed globally: 


Could you change the path to the one noted above and let me know your feedback?


/home/user/.dotnet/tools/dotnet-script --
A fatal error occurred. The required library could not be found.
If this is a self-contained application, that library should exist in [/home/user/.dotnet/tools/.store/dotnet-script/0.52.0/dotnet-script/0.52.0/tools/netcoreapp3.1/any/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].

The .NET Core runtime can be found at:

Process finished with exit code 131 (interrupted by signal 3: SIGQUIT)


It works from terminal window


This behavior indicates that Rider uses a different set of environment variables than your terminal session, for example when .NET Core is installed via snap.


You can check it using echo $PATH and echo $DOTNET_ROOT in your terminal window and inside the Rider's Terminal tab to see if they match. If this is the case, you can add the appropriate values to PATH and DOTNET_ROOT to .profile and source it.


Please let me know if it helps.


Output is the same 

user@pc6028:~$ echo $PATH
user@pc6028:~$ echo $DOTNET_ROOT


Thank you for the information Александр,


Could you check if PATH and DOTNET_ROOT are the same when using env / printenv just like when using echo?


Please sign in to leave a comment.