What problem does it solve?
This Skill explains how to build, run, and publish .NET 10 file-based C# applications from a single source file so you can avoid creating and maintaining a .csproj for small utilities, scripts, and one-off tools while preserving package and SDK configuration via top-of-file directives.
Core Features & Use Cases
- Directive-driven configuration: Use top-of-file directives to declare NuGet packages, SDK selection, MSBuild properties, and project references without a .csproj.
- CLI-first workflow: Run, build, restore, clean, and publish single-file apps using familiar dotnet commands and control caching, outputs, and launch profiles.
- Migration and distribution: Publish native AOT artifacts by default, pack as a .NET tool, and convert a file-based app into a full .csproj when the app grows beyond a single file.
- Use Case: Quickly create a small command-line tool that references Serilog via a package directive, run it locally with dotnet run, then publish a native AOT executable for distribution.
Quick Start
Run the file-based C# source file using the .NET 10 SDK, ensure all #: directives appear at the top of the file, and publish a native AOT build when ready.