canro91.github.io
What Frustrates Me the Most as a C#/.NET Developer
Excerpt
## 1. Naming Naming is one of the two hardest parts of Computer Science. And Microsoft doesn't help that much. On one hand, we have ".NET Core" renamed to ".NET". Everything is .NET now. Was it a marketing strategy? Dunno. Probably. On the other hand, target framework monikers. You know, the version number we put inside our .csproj files. For some time, they were `.netcoreapp1.X`, `.netcoreapp2.X`, and `.netcoreapp3.X`. But one day, they changed it. I imagine a conversation somewhere on Teams at Microsoft like this: - Let's change monikers too. Let's also use `.net` plus the version number. - Wait, we can't do `.net4`. We already have a .NET Framework 4.0. People will get confused. - Ok, let's jump to `.net5`. … ## 2. Too many releases It's a good thing we have an evolving ecosystem. I used to read all the release notes and tried to pick up as many new features as I could. Now? I only care about long-term versions. I don't even pay attention to the short-term ones. Something somewhere is a bit faster on an architecture I don't use at work. Sorry Microsoft! Too many releases make it harder to keep up. ## 3. C# is getting too bloated C# doesn't feel like a single language anymore. It feels like three languages: one pre-2010, one around 2010, and the one we have now. I used to closely follow every new language release. Not anymore. C# as a language is getting less consistent. Too many options to create and initialize objects, for example. Apart from nullable references and pattern matching and maybe another feature here and there, it's more and more syntactic sugar on every release. I'm only waiting for discriminated unions. The worst part is features that look the same but work differently. Yes, I'm looking at you, primary constructors. They look like records, but surprise, surprise...They work differently. ``` public record ThisIsARecord(string ThisIsAPublicProperty); public class ThisIsAClassUsingPrimaryConstructor(string ThisIsNotAPublicProperty) { } ``` This inconsistency makes the language harder to teach and learn. ## 4. AutoMapper Ok, there's nothing wrong with AutoMapper. But what frustrates me is that, for some reason, we have adopted it as the de facto mapping library. And most of the time, AutoMapper ends up getting in our way. Even AutoMapper's author recommends not to use it if we're mapping more than 80% of our fields by hand. But anyway, we use it even when we shouldn't. Just in the past weeks, I found two scenarios that got in my way, ignoring unmapped fields in the destination type and getting mappings flagged as invalid. Sure, I know I was abusing AutoMapper. I wanted to add EntityFramework Core to this list, but I'm starting to feel the frustration in my stomach. Probably, I'm hungry. But, frustrations aside, .NET is still my go-to platform and C#, my go-to language. … > And finally, now they are adding that so much syntactic sugar in order to make it more appealing for... pythonists? I used to follow every release in excitement for new features. but maybe apart from nullable references and pattern matching, it's more syntactic sugar with every recent release. Nothing we can't live without it.
Related Pain Points
C# language bloat and inconsistency
6C# has accumulated so much syntactic sugar and features that it feels like three different languages. Inconsistencies between similar features (e.g., primary constructors vs. records, different object initialization methods) make the language harder to teach, learn, and use consistently.
Frequent breaking changes and rapid major version releases create maintenance burden
6Next.js has introduced 15 major versions in 8 years, each potentially containing backwards-incompatible changes. This creates significant maintenance burdens for long-term projects and makes it difficult for teams to keep applications updated.
AutoMapper overuse despite poor fit
5AutoMapper has become the de facto mapping library in .NET despite its own creator recommending against use cases where >80% of fields are manually mapped. Developers adopt it even when inappropriate, leading to unmapped field issues and invalid mapping flags.
Confusing .NET and C# naming conventions
4Microsoft's rebranding of .NET Core to .NET and frequent changes to target framework monikers (e.g., .netcoreapp3.X to .net5+) creates confusion. The naming strategy makes it harder for developers to understand version compatibility, especially when .NET Framework 4.0 still exists alongside .NET 5+.