C# on a diet with scriptcs
Glenn Block DEV304
What we’re going to coverWhat scriptcs is and why it existsHow to get itBasics of how to use itPutting the pedal to the metal
scriptcs
C#
But sometimes it feels heavy
What if there was a low cal option?
Similar to these
The node developer experience
The node developer experienceNo IDE required – Any editor will doNo projectMinimum installEverything else is a package
What about C#?
The scriptcs developer experienceNo IDE required – Any editor will doNo projectMinimum installEverything else is a package
scriptcs hello.csx
Using scriptcsWrite code in the REPL or stand alone scriptsNo class required, can write plain procedural codeInclude other scripts with #loadReference assemblies with #rAccess script arguments with ScriptArgsThe rest is plain old C#
packages
packagesNuget.exe is not requiredInstall any nuget package with scriptcs -installCan install a set of packages via packages.configPackages and all dependencies installed locallyAutomatically loaded into your scripts, just add a using
scriptcs in action
http://www.flickr.com/photos/csullens/4344741769/sizes/l/in/photolist-7BVWmR/
scriptcs in actionExperimentationConsole utilitiesWeb apps (Nancy)Web APISSimple WPF apps
Hardware automationHosting in memory databases
Not everything in script land is pretty
Script packs
Script packsAdd reference assembliesAdd using statementsMake .NET libraries more consumable from scripts
Hosting
HostingAdd script support to your own runtimesHost scripts in a full blown web appHost scripts anywhere
Open source and open to contributionOn githubApache 2125 forks30 ContributorsAlmost 80 commits
http://github.com/scriptcs/scriptcs
What we coveredscriptcs is a tool which offers lightweight C# devNot a replacement for VS or PowershellUseful for prototyping, tinkering, automationOffers both editor based and REPL developmentIntegrates with nugetCan be hosted in your own appsIs open source and has a rich community
Related contentBreakout Sessions (session codes & titles)
DEV309 – ASP.NET Web API – What’s new (all demos using scriptcs!)
Find Me Later At...At the Microsoft booth, or ping me on twitter: @gblock
Evaluate this session and you could win instantly!
Head to...aka.ms/te
© 2013 Microsoft Corporation. All rights reserved.Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.