C# REPL outside Visual Studio

后端 未结 8 2072
太阳男子
太阳男子 2021-01-31 16:19

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,

8条回答
  •  遥遥无期
    2021-01-31 16:52

    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:

    • Util - View Roslyn AST Graph v1.0.exe - good to see the AST tree created by Roslyn
    • Util - Exe Creator (using Roslyn Compiler v1.0.exe - Nice tool to create stand alone exes
    • Util - Roslyn - Compile Solution and view errors v1.0.exe - compile entire solutions
    • Util - Roslyn - OnSave Compile Solution (with REPL) v1.0.exe - adds a REPL for Roslyn objects
    • PoC - Roslyn refactor on InitializerExpressions v1.0.exe - shows an refactoring example
    • Util - Roslyn AST Refactoring via REPL Script v1.0.exe - gui to develop refactoring scripts
    • Util - Roslyn Cat.Net- Compile and Scan Solution v1.0.exe - shows integration of code compile and security scanning (Cat.NET will be download the first time this tool is executed)

    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 :)

提交回复
热议问题