Why .NET 10’s Best New Trick

Will Change How You Write C# Forever

Copy of AI and Cursor IDE give you superpowers - Part 1 - Blog Post Listing Image (1).jpg

Version 1.00

03/06/2025


Ready for a revolution in C# development?

There’s a game-changing feature hiding in .NET 10 (currently in Preview 4) that every developer, rookie or veteran, needs to know about.

For years, C# developers have been living with a “necessary evil”: every time you want to try out a new idea, write a quick script, or prototype something, you’ve had to create a full-blown project, solution files, project files, and all the ceremony.

Not anymore. 

Meet the “Just Run Your Code” Era .NET 10 introduces something gloriously simple: you can now run a plain .cs file directly from the command line using simple 'dotnet run main.cs', that’s it.

No .sln. No .csproj. No scaffolding. Just a single file, executed instantly, just like Python, Node.js, or your favorite scripting language.

Why Is This a Big Deal?

  • -Rapid Prototyping: Want to test an idea or share a quick example? No setup, write and run.

  • -Clean Learning Curve: Newcomers to C# don’t get overwhelmed by project structure, focus on code.

  • -Dev Joy: Sometimes, all you want is to see if your logic works. Now, it’s as easy as a one-liner.

  • -Cross-Platform Scripts: Bring C# scripting into your toolbelt alongside Bash, PowerShell, and Python.


How to Get Started

-Install .NET 10 Preview 4 (get it here)

-Write your C# code in main.cs (or any filename).

-Open your terminal and type: 'dotnet run main.cs' where 'main.cs' is the code file you wnat to run.


The Bottom Line

This single feature lowers the barrier for C# more than anything in recent memory. Whether you’re building a quick tool, teaching someone new, or just experimenting, .NET 10 makes it easy, fast, and fun.


Ready to see how effortless C# can be? Try it yourself and let me know what you build!

An error has occurred. This application may no longer respond until reloaded. Reload 🗙