Browse files


  • Loading branch information...
1 parent ca47c8e commit 7106bbb82caa3f4d192c93e9ea57333f77067e01 @filipw filipw committed Jan 5, 2014
Showing with 52 additions and 1 deletion.
  1. +52 −1
@@ -65,6 +65,22 @@ Hello, world!
+REPL supports all C# language constructs (i.e. class defnition, method definition), as well as multi-line input. For example:
+C:\> scriptcs
+scriptcs (ctrl-c or blank to exit)
+> public class Test {
+ public string Name { get; set; }
+ }
+> var x = new Test { Name = "Hello" };
+> x
+{Name: "Hello"}
### Writing a script
* In an empty directory, create a new file named `app.csx`:
@@ -178,7 +194,7 @@ scriptcs server.csx
### Referencing assemblies
-You can reference additional assemblies from the GAC or from the bin folder in your script's directory using the [#r directive](
+You can reference additional assemblies from the GAC or from the `bin` folder in your script's directory using the [#r directive](
#r "nunit.core.dll"
@@ -195,6 +211,37 @@ Console.ReadKey();
Instructions for debugging scripts using Visual Studio can be found on the [wiki](
+### Package installation
+You can install any NuGet packages directly from the scriptcs CLI. This will pull the relevant packages from NuGet, and install them in the packages folder.
+Once the packages are installed, you can simply start using them in your script code directly (just import the namespaces - no additional bootstraping or DLL referencing is needed).
+The `install` command will also create a `packages.config` file if you don't have one - so that you can easily redistribute your script (without having to copy the package binaries).
+ - `scriptcs -install {package name}` will install the desired package from NuGet.
+ For example:
+ scriptcs -install ServiceStack
+ - `scriptcs -install` (without package name) will look for the `packages.config` file located in the current execution directory, and install all the packages specified there. You only need to specify **top level** packages.
+For example, you might create the following `packages.config`:
+ <?xml version="1.0" encoding="utf-8"?>
+ <packages>
+ <package id="Nancy.Hosting.Self" version="0.16.1" targetFramework="net40" />
+ <package id="Nancy.Bootstrappers.Autofac" version="0.16.1" targetFramework="net40" />
+ <package id="Autofac" version="" targetFramework="net40" />
+ </packages>
+And then just call:
+ scriptcs -install
+As a result, all packages specified in the `packages.config`, including all dependencies, will be downloaded and installed in the `packages` folder.
## Contributing
@@ -216,6 +263,10 @@ Want to chat? In addition to Twitter, you can find us on [Google Groups](https:/
* [Glenn Block]( ([@gblock](
* [Justin Rusbatch]( ([@jrusbatch](
* [Filip Wojcieszyn]( ([@filip_woj](
+## Core Committers
* [Damian Schenkelman]( ([@dschenkelman](
* [Kristian Hellang]( ([@khellang](

0 comments on commit 7106bbb

Please sign in to comment.