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