The Unix shell is great for supporting executable scripts via the shebang header, but I’ve always found scripting languages limiting, due to the inability to specify dependencies (other than the standard library). This has always been Python’s appeal with its “batteries included”, but I dislike Python, and its standard library isn’t enough either. And then, Scala CLI has spoiled me, now being my favorite way to build scripts.

So without further ado, here’s how to build executable scripts that have dependencies in some of my favorite languages…

C#

Prerequisites

.NET 10 SDK or newer needs to be installed, since file-based apps (running a single .cs file directly, without a project) were introduced in .NET 10.