GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — REPL REPL
Adam Ralph edited this page
scriptcs supports REPL which is an acronym for The REPL uses the context of the directory it's executed in, so you automatically have access to all installed packages. You can also (just like in script files) use the #load and #r directives to reference CSX files and assemblies. The scriptcs REPL can be started by running scriptcs without any parameters. To reference other assemblies, you can use the #r directive. C:\>scriptcs scriptcs (ctrl-c to exit or :help for help) > #r "MyAssembly.dll" The scriptcs runtime will first try to resolve and load the assembly from the bin folder, and if that fails, try loading it from the GAC. To reference other script files, you can use the #load directive. The path provided can be either absolute or relative. C:\>scriptcs scriptcs (ctrl-c to exit or :help for help) > #load "MyFile.csx" > #load "C:/MyFile.csx" In the example below, we install the Newtonsoft.Json NuGet package and use it inside the scriptcs REPL. C:\>scriptcs -install Newtonsoft.Json INFO : Installing packages... Installing packages... Installed: Newtonsoft.Json Package installation succeeded. Saving packages in scriptcs_packages.config... Creating scriptcs_packages.config... Added Newtonsoft.Json (v6.0.8, .NET 4.5) to scriptcs_packages.config Successfully updated scriptcs_packages.config. C:\>scriptcs scriptcs (ctrl-c to exit or :help for help) > using Newtonsoft.Json; > JsonConvert.SerializeObject(DateTime.Now); "2013-05-22T12:50:47.2474102+02:00"
Clone this wiki locally |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |