For years, C# developers have lived with a specific kind of “ceremony.” If you wanted to test a simple library or write a quick automation script, you couldn’t just write code. You had to build a cathedral first. You needed a folder, a .csproj file, a bin directory, and an obj directory just to print "Hello World."

But with the release of .NET 10, Microsoft has finally cut the cord. You can now run C# files directly — no project file, no boilerplate, and no friction.

The “Hello World” Reality Check

Look at the shift. Before .NET 10, running a single file felt like a chore. You had to scaffold an entire project structure just to get the compiler to listen to you.

Old .NET / Traditional Way

dotnet new console
cd <project-folder>
dotnet build
dotnet run

Old-style Program.cs:

using System;

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Hello, World!");
    }
}

This is the classic structured approach with:

explicit Main()

project file (.csproj)

separate build step

Modern .NET 10 Way:

Console.WriteLine("Hello, World!");

Run directly from terminal:

dotnet run app.cs

or: Bash

dotnet app.cs

No project setup needed for quick checks.

It’s that simple. One file. One command.

Why This Isn’t Just “Scripting”

Purists might argue that we’ve had C# scripting (.csx) for a while. But this is different. This isn't an interpreted afterthought—this is Real Compiled C#.

When you run dotnet run app.cs, .NET 10 treats your code with the same respect as a massive enterprise solution. You get the full power of the JIT (Just-In-Time) compiler and the performance optimizations that make .NET one of the fastest runtimes on the planet.

You’re getting Python-level simplicity with C++ level speed.

The most brilliant part of this update is the “graduation” path.

We’ve all been there: you start a “quick script” that eventually grows into 2,000 lines of logic. Usually, moving that script into a formal project is a manual, annoying process of copy-pasting and folder-creating.

.NET 10 introduces a “convert” command that handles the heavy lifting for you:

dotnet project convert app.cs

This command scaffolds a full project around your script, turning your file-level directives into a proper .csproj file automatically. It allows you to start small and scale only when necessary.

Why This Matters (The “Core Benefits”)

1. Zero Scaffolding

“Write code and run immediately. Perfect for new projects.” This removes the friction. It allows a developer to focus 100% on logic, rather than configuration management, especially in the exploration phase.

2. Real Performance

Critics might dismiss this as “C# Scripting,” which was interpreted and slower. This is Real Compiled C#. The runtime still compiles the file using the JIT, providing native speed and optimization. You get Python-level agility with C++-level execution.

3. Smooth Progression

This is perhaps the smartest feature. We’ve all seen a “quick script” mutate into a massive utility. The process allows you to “Gradually convert to a full project when you need structure.” With one command, you can scaffold your script into a traditional project structure:

dotnet convert app.cs

Final Thoughts

C# has always been a powerhouse for enterprise solutions, but it often felt too “heavy” for quick automation or learning. By officially supporting File-Based Apps, .NET 10 makes the entire ecosystem feel light, modern, and accessible.