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

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes