Hacker News new | ask | show | jobs
by stephbook 40 days ago
What I hate about .NET is the atrocious naming.

Net Core, Net Framework, Net Common Core, .NET..

And God forbid any of these frameworks ever expose what they are in a config file. You start a project, hand it to a colleague and he can't figure out whether it's Framework or Core by looking at the files. You Google and are immediately bombarded by 15 year old threads.

3 comments

If you start a project with .NET Framework in 2026, you're doing it wrong, plain and simple.

And the .csproj files do tell you which .NET they are.

<TargetFrameworkVersion>v4.</TargetFrameworkVersion> or <TargetFramework>net4</TargetFramework> is the old framework. Also, if the file is an unreadable mess listing all .cs files, it's generally .NET Framework.

<TargetFramework>netstandard2.0</TargetFramework> is .NET Standard 2.0, which means this library can be consumed from either Framework or modern .NET.

And finally, <TargetFramework>netX.0</TargetFramework> (X >= 5) is the modern .NET.

Forget about the old stuff; just use .NET 10.

It's really, really good now. DX is fantastic. Yes, the hot-reload will probably never match that of interpreted languages, but for a compiled language, it is good.

File-based apps are easy to get started with: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals...

EF is solid and proven. Easy, low-lift type safety end-to-end from DB up with very good perf.

Tooling is dead simple and consistent; `dotnet build`, `dotnet test`, `dotnet run`, `dotnet ef database update`, `dotnet ef migrations add`, `dotnet tool restore`. No mix of build tools and toolchains.

Never tried .NET 10 but hot-reload was garbage with .NET 9 and 8.

It failed very often and you had to manually restart the dev process. Even when it worked, it was no where as fast as eg using Bun with TS.

Also Minimal APIs didn't have feature parity vs MVC even 4 years after release which is quite frankly insane. I hear in .NET 10 they've finally added some validation. Not sure how it compares to something like FluentValidation which still is one of the most downloaded nuget packages.

    > It failed very often and you had to manually restart the dev process. Even when it worked, it was no where as fast as eg using Bun with TS
Really depends on what you're doing. For run of the mill APIs, it works pretty flawlessly with `--non-interactive` and just auto-restarts when it needs to, hot reloads when it can (again, I'm not comparing this to interpreted languages and runtimes; the constraints are just different).

I have a clip of this in action with .NET 9 generating OpenAPI contracts and TS bindings at the top of this README: https://github.com/CharlieDigital/dn9-openapi-codegen/blob/m...

    > Also Minimal APIs didn't have feature parity vs MVC even 4 years after release which is quite frankly insane
Why does it need to? That's like saying express should have feature parity with Nest.js; they have different use cases in my view :shrug:
I had to run it with --no-hot-reload to get a consistent behavior.

> That's like saying express should have feature parity with Nest.js

I disagree but, objectively, validation is a fundamental part of any web app or API.

They shipped Minimal APIs in .NET 6 without validation. The functionality was already there for MVC so it's not like they had to build it from scratch. And yet, they didn't add it until .NET 10.

I just find it very weird that there are two standards here.

Express is ostensibly the analog of minimal APIs and ships with no validation. You pick your validation library and build on top of it. A less complete, less opinionated, bare-bones stack on which you build with explicit stack choices.

Nest.js is ostensibly the analog of controller APIs and ships with validation. A more complete, more opinionated approach where you lean in to stack defaults.

This makes total sense in the Node.js world; I don't see why controller and minimal have to have feature parity when they have different use cases and, like Express, it's possible to pull down third party validation libraries. Controller API is more opinionated like Nest.js while minimal is intentionally less opinionated like Express.

Most web projects use JSON files for configuration. There are also some XML files for project configuration. If anything, you can run into too much configuration files.