Have you ever wanted to get your hands on Microsoft's C# REPL Command-Line Interface (csi.exe) without having to install Visual Studio? Dude, look no further!
Dude is what you're looking for, and all in a single exe!
- The Dude requires .NET Framework 4.6 or later.
- Download dude.exe.
- (Optional) add the folder containing dude.exe to your PATH.
Dude is functionally identical to csi.exe. E.g.
dude.exe starts a REPL session.
dude.exe hello.csx runs a C# script.
dude.exe -? shows help.
How it works
Dude, like csi.exe, is a tiny wrapper around various
Microsoft.CodeAnalysis libraries. The only differences (apart from the name) are:
- The invocation of the
Microsoft.CodeAnalysismembers that do all the the heavy lifting is via reflection since most of them are internal. (Note that this should have negligible performance impact since the reflective calls only represent a small doorway into the code that does all the work.)
- All the required assemblies are merged into a single exe using ILRepack.
- The default response file is created alongside the exe the first time it is run.