Categories
.NET .NET 10 C# CLI Code Desktop Developer File Apps Mobile Tips Visual Studio VS Code VS2022 VS2026 Windows

Run C# Source Files Directly in .NET 10

The file app is a new feature in .NET 10 that lets you run a C# source file directly without requiring a project file, like dotnet App.cs. While the build system is tightly integrated with the project file, it operates virtually within the file-based app execution.

Project components like SDK, properties, references, and packages are now defined directly within the C# source file. This is done with the help of C# Ignored Directives. This ensures seamless integration with the virtual project file.