One of the cool things that scriptcs allows you to do, is that you can embed it into your application and allow execution of C# scripts. There are even some great resources on that out there, like this awesome post by Mads.
The same applies to the REPL functionality – you don’t have to use scriptcs.exe to access the REPL – you can use the scriptcs Nuget packages to create a REPL inside your app.
And because there aren’t that many resources (if any) on how to host a scriptcs REPL, today I wanted to show you just that. But for a more interesting twist, we’ll do that inside a DNX application.
There are many reasons why DNX is awesome, and why you’d want to use it, but especially because, through the project.json project system, it has a much improved way of referencing and loading dependencies and Nuget packages – and we can leverage that mechanism to feed assemblies into our REPL.