.NET 10 introduces the ability to run single C# files without a .csproj using `dotnet run app.cs`. Behind the scenes, the SDK creates a virtual project file in memory by parsing #: directives for packages, properties, and SDKs, then uses MSBuild to restore and build the application. The implementation includes caching mechanisms to avoid unnecessary rebuilds and handles various edge cases through target overrides to work around NuGet limitations with in-memory projects.
Sort: