ScriptCS project page ScriptCS on github
- run powershell as admin
- install chocolatey
- install scriptcs chocolatey package
- run
$ scriptcs -help
- run
$ scriptcs
or$ scriptcs -repl
Scripts run in a "roslyn" scripting session.
Console.WriteLine(System.Reflection.MethodInfo.GetCurrentMethod());
c.f. /basic/httpd.csx
Pass args to a script during invocation, in order, after a double-hyphen.
e.g.: foo.csx -- bar baz bin
c.f. /args/args.csx
- include
#load
directives at the top of your script
c.f. /ref-script/main.csx
- include
#r
directives at the top of your script
c.f. /ref-assembly/random.csx
- install the package with scriptcs:
$ scriptcs -install [package]
- OR specify a particlar package version:
$ scriptcs -install [package] -packageversion [version]
- nuget packages are implicitly referenced (just add "using" statements)
c.f. /nuget/main.csx
List of available script packs: https://github.com/scriptcs/scriptcs/wiki/Script-Packs-master-list
Script packs implement a standard interface that allows them to be imported with Require<>
.
- install the script pack:
$ scriptcs -install [script-package]
- import the script pack with
Require<TScriptPack>()
c.f. /script-packs/zippo.csx