How to run a file-based C# app with `dotnet run app.cs` in .NET 11

A complete guide to file-based C# apps: running a single .cs file with dotnet run, the #:package, #:sdk, #:property, #:project and #:include directives, multi-file scripts with #:ref, argument and stdin handling, the build cache, native AOT publishing, packaging as a dotnet tool, and dotnet project convert when the script outgrows itself.