Skip to content

Instantly share code, notes, and snippets.

@noseratio
Created June 17, 2021 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save noseratio/ee2cf4c4e39cf2db4b409b1b8c75e029 to your computer and use it in GitHub Desktop.
Save noseratio/ee2cf4c4e39cf2db4b409b1b8c75e029 to your computer and use it in GitHub Desktop.
C# REPL with Microsoft.Net.Compilers.Toolset
# https://www.nuget.org/packages/Microsoft.Net.Compilers.Toolset
md cs-repl | cd
nuget install Microsoft.Net.Compilers.Toolset
# run a CS script, a useful alternative to PowerShell itself
echo 'Console.WriteLine("hello");' > script.csx
. (gci -recurse csi.exe).FullName script.csx
# run in REPL mode
. (gci -recurse csi.exe).FullName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment