F# has a REPL (read–eval–print loop) F# Interactive, C:\Program Files (x86)\Microsoft F#\v4.0\Fsi.exe
.
I understand C# now has its own interactive REPL, as released with Roslyn. How do I open outside Visual Studio? Where is csi.exe
?
F# has a REPL (read–eval–print loop) F# Interactive, C:\Program Files (x86)\Microsoft F#\v4.0\Fsi.exe
.
I understand C# now has its own interactive REPL, as released with Roslyn. How do I open outside Visual Studio? Where is csi.exe
?
C# Interactive window and csi.exe REPL were added to Visual Studio 2015 Update 1 (emphasis mine):
See What’s New in Visual Studio 2015 Update 1 for .NET Managed Languages.
https://www.visualstudio.com/en-us/news/vs2015-update1-vs.aspx
The only executable I found is
C:\Program Files (x86)\Microsoft Codename Roslyn CTP\Binaries\rcsi.exe
, which can execute.csx
files. But it doesn't seem to actually support REPL.How about scriptcs: http://scriptcs.net/?
There is a REPL and you even get the power of NuGet.
It may not be a substitute but I mainly use RoslynPad for quick research and test. I've also used Linqpad. RoslynPad is "A simple C# editor based on Roslyn" according to their website https://roslynpad.net/. You can write small scripts and you can see variables values' and you may also save them.
I created exactly what you are asking for, a Roslyn based REPL running outside VisualStudio.
You can download it from PoC - Roslyn C# ScriptEngine Execute v1.0.exe which is a stand-alone exe containing all Roslyn assemblies as embedded resources. See also Video: Using O2's Roslyn-based C# REPL Script environment
Note that I have developed a more powerful C# REPL for the O2 Platform, which you can see and download from C# REPL Script Environment
On the topic of Roslyn, here are a number of other stand-alone tools that I created:
Note that all these tools and the O2 Platform are released under an Open Source license, so please fell free to expand and make them better :)
Anders Hejlsberg builds a C# REPL loop in this video, 65 minutes in:
http://channel9.msdn.com/Events/PDC/PDC08/TL16#time=65m00s
It's a much older version of Roslyn, but the same ideas apply (and eval! ;).