r/csharp • u/Interesting_Paint_82 • 18h ago
C# file-based apps are a breath of fresh air
Back when .NET 10 came out I didn't pay much attention to the file-based apps. Now that .NET 11 came out i stumbled upon this video and became more interested:
https://www.youtube.com/watch?v=Yvn7liNioto
Turns out file-based apps are pretty cool after all. The minimalistic developer experience of having only your text editor, your .cs file(s) and the dotnet cli feels fresh after working so long with solution files, project files and all that jazz.
To get a feel of the DX and where the capabilities of file-based apps are at the moment I created this tongue-in-cheek todo web app, with the frontend and backend in a single C# file. File-based apps and minimal APIs are like meant for each other.
https://github.com/TDMR87/single-file-todo-app
I do hope file-based apps become more common and the dotnet team would lean more on this kind of experience. Together with AOT compiling native executables this could make C# more popular and invite people over to the ecosystem. How do people here feel about these file-based apps? Do they have a future?
https://learn.microsoft.com/en-us/dotnet/core/sdk/file-based-apps