Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

stlaltdotnet/20140326-scriptcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScriptCS Lightning Talk

ScriptCS project page ScriptCS on github

Installation

  1. run powershell as admin
  2. install chocolatey
  3. install scriptcs chocolatey package

Getting help

  1. run $ scriptcs -help

ScriptCS REPL

  1. run $ scriptcs or $ scriptcs -repl

Scripts run in a "roslyn" scripting session.

Console.WriteLine(System.Reflection.MethodInfo.GetCurrentMethod());

Basic script

c.f. /basic/httpd.csx

Passing args to a script

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

Referencing other scripts

  1. include #load directives at the top of your script

c.f. /ref-script/main.csx

Referencing assemblies

  1. include #r directives at the top of your script

c.f. /ref-assembly/random.csx

Referencing nuget packages

  1. install the package with scriptcs: $ scriptcs -install [package]
  2. OR specify a particlar package version: $ scriptcs -install [package] -packageversion [version]
  3. nuget packages are implicitly referenced (just add "using" statements)

c.f. /nuget/main.csx

Installing script packs

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<>.

  1. install the script pack: $ scriptcs -install [script-package]
  2. import the script pack with Require<TScriptPack>()

c.f. /script-packs/zippo.csx

About

scriptcs lightning talk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published