31 May

Taking Baby Steps with ScriptCS

Category:UncategorizedTag: , , , :

I?ve been following the ScriptCS project with great interest over the last couple of months. As you may know by now, I?ve been searching for a more lightweight .NET development experience for quite some time. The ScriptCS project is here to fulfill this desperate need. Driven by the open-source .NET community, this wonderful initiative promises to unleash C# from Visual Studio which is exactly what I?ve been looking for.

Being heavily inspired by the node.js development workflow, ScriptCS is built on top of Roslyn and makes heavy use of NuGet for installing packages and script packs. You can get up and running in no time by installing ScriptCS using Chocolatey. If you didn?t have Chocolatey installed already (like me), then it can be easily done by running the following Powershell command:

@powershell -NoProfile -ExecutionPolicy Unrestricted -Command "iex ((New-Object Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1′))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin 

Now we can install ScriptCS by simply running the following command:

cinst scriptcs

That?s all we need!

Now in order to do something useful with it, we can clone the samples repository to our dev machine and try to run the Nancy sample application. Navigate to the Nancy folder in a command prompt and run the command ?scriptcs -install? to install all package dependencies defined in the packages.config file. Next run the following command to start the web application:


Now open up your favorite browser, navigate to http://localhost:1234 and et voil?:


Amazing isn?t it?

I do recognize that the project is still very much a work in progress. Also something that?s not entirely clear for me is the deployment story. The road map mentions some kind of export functionality to an .exe or a Visual Studio Project. In any case, there should be an easy way to convert the code files into binary form.

Something that I also would love to see is support for Mono. How cool would it be to develop and run C# code using ScriptCS on Mac and Linux?

The future for ScriptCS certainly looks bright and I?m very much looking forward to where this particular road is taking the .NET universe. Take a look at the wiki and start familiarize yourself with ScriptCS as it?s going to open up very interesting opportunities for future .NET development.

Until next time.

7 thoughts on “Taking Baby Steps with ScriptCS

  1. Nice post Jan! Glad you are finding scriptcs useful!

    On the binaries, we have a PR waiting to be merged right now which will by default always create a binary which will be recompiled when the scripts are changed. We will still support in-memory compilation as we do now.

    As the exporter you mentioned, that’s more about offering a way to grow up a script project to a full blown VS project. Having script packs complicates achieving this, but we believe it is still doable.

    Looking forward to seeing what you do with it and more posts from you in the future. Oh and also any contributions to the code base 🙂

  2. Very cool! Thanks for the update on the deployment story. Looking forward to see this in action.

  3. Will Roslyn ever run on Mono? You might be interested in a project with a different goal – https://github.com/nosami/Omnisharp . It’s full project development (intellisense, project navigation, refactoring etc.) without VS and runs on Windows, Linux and OSX.

    Would sure be interesting to combine the two though.

  4. Jason, not sure. However scriptcs will as we are not dependent on Mono / we have an engine abstraction. The mono support is in flight.

Comments are closed.