Thomas 10/14/2025

.NET 10: Run Standalone C# Files Without Project

Read Original

This article details a new feature in the upcoming .NET 10: the ability to execute standalone C# files directly using the `dotnet run` command, eliminating the need for a formal project. It provides a practical example, compares the approach to Python scripting, and shows how to reference NuGet packages within these script files using a new `#:package` directive.

.NET 10: Run Standalone C# Files Without Project

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

2
Designing Design Systems
TkDodo Dominik Dorfmeister 2 votes
3
Introducing RSC Explorer
Dan Abramov 1 votes
5
Fragments Dec 11
Martin Fowler 1 votes
6
Adding Type Hints to my Blog
Daniel Feldroy 1 votes
7
Refactoring English: Month 12
Michael Lynch 1 votes
9