Live data from Hacker News

Reinventing how .NET builds and ships (again)

devblogs.microsoft.com

101–110 of 146 posts

Re: Reinventing how .NET builds and ships (again)

#101
post #84
post #18

I have a lot of respect for the .NET team. They often publish great in-depth articles and their pursuit for performance is relentless (e.g. see Kestrel and Entity Framework evolution). And ASP.NET is one of the few large projects which managed to survive a large breaking changes. Almost to Python 2->3 level. You had to change how your web app behaved completely if you relied on their magic session which worked hard t…

I am not sure what the stats are but I am certain they left behind a huge number of projects. Probably a population that won't be very vocal on HN but that doesn't mean they don't exist. Even for new projects there are problems I run into that force me to use 4.8. Like if you build an Excel formula, the mandatory async/await approach just doesn't work. It's not an asynchronous operation and runs into a UI context whe…

> Like if you build an Excel formula, the mandatory async/await approach just doesn't work. It's not an asynchronous operation and runs into a UI context where you deadlock if you wait.

Last time I did excel interop it was COM based and there wasn't any async part of it. I'm curious if you were using COM interop also? Also, async/await was explicitly designed to work in UI contexts like Winforms and WPF where there is only a single UI thread...?

> It took like 15 years before they added a json serializer to the standard library..

That isn't really true. DataContractJsonSerializer [0] landed in .NET 3.5 which was in 2007. Admittedly, it kinda sucked but it was there and was usable. And also JSON.Net was around by that point and was/is excellent.

> ...and don't even think about support for any new major image format (webp, heic).

Image support on windows was historically provided by WIC [1] and does support the formats you talked about. But you are correct that native .NET support for many image formats is non-existent.

> And because they broke backward compatibility on so many libraries, it's a non trivial effort to convert a complex code base to core.

This is very true, and I felt it firsthand. My employer still has a codebase on .NET Framework (compiled against 4.5.2 but deployed against 4.8). It is WCF based and the jump to Core was a massive break. But in the end, I think the break was a good decision. There were just too many design mistakes, bad assumptions and underlying system changes to keep compat across the big leap to a modern multi-platform framework. .NET today is faster, more flexible and has more capabilities than .NET Framework ever did. Even if it did take a long time to get here.

And besides, even if new features are not coming to .NET Framework anymore, Microsoft has support .NET 3.5.1 until 2029! [2] Isn't 22 years of support enough? (.NET 4.8's EOL hasn't even been announced yet!)

[0] https://learn.microsoft.com/en-us/dotnet/api/system.runtime.... [1] https://learn.microsoft.com/en-us/windows/win32/wic/native-w... [2] https://learn.microsoft.com/en-us/lifecycle/products/microso...

Re: Reinventing how .NET builds and ships (again)

#102

Earlier quoted context omitted.

Problem is though Python is slow at runtime. May not matter for many use cases, but I've worked with a lot of startups that suffered terrible reliability problems because they chose Python (or Rails, or Node to some extent) and the service cannot handle peak time load without a lot of refactoring and additional app servers. Depending on your framework Python is at best ~3x slower (FastAPI) and at worst ~20x (Django)…

I don't spend a lot of time building services, but the last few I've done, I actually went straight to Rust. The downside is that it's quite slow to develop -- I probably don't have the knowledge that others do, but it seems that frameworks could really use some work. That said, I love that I can find and fix most my problems during development. Building a service in Python means I'm constantly fixing issues in produ…

> .NET is certainly better than Python, but I'm not very happy with the type system and the code organization versus my Rust projects.

Have you given F# a whirl?

Re: Reinventing how .NET builds and ships (again)

#103
post #21

one thing that struck me was that the foundation for this effort was the linux distro build system. in other words, the work they put into making .net open-source and cross-platform eventually made everyone's lives easier.

Author of the post here,

We wanted the option for distro maintainers to include .NET in the native distro package feeds. This means that distro maintainers have to build the product, not us, and that means creating a build system that meets their requirements. So you either end up with two build systems, or you try and unify. The only direction that it's feasible to go is towards the Linux distro model. It's the most restrictive.

The good news is that the distro model is SIMPLER. It may not be the most performant. A really good distributed system with caching would be far faster. But that's not a solution that's easy to implement or compatible with distro maintainer workflows. Optimizing for simpler in this case is better though. We want the community to be able to participate in a meaningful way. Build for BSD, build for S390x, build and include in distro feeds, etc. We can't feasibly support every platform and scenario that the community wants.

Re: Reinventing how .NET builds and ships (again)

#104
post #21

one thing that struck me was that the foundation for this effort was the linux distro build system. in other words, the work they put into making .net open-source and cross-platform eventually made everyone's lives easier.

Author of the post here, We wanted the option for distro maintainers to include .NET in the native distro package feeds. This means that distro maintainers have to build the product, not us, and that means creating a build system that meets their requirements. So you either end up with two build systems, or you try and unify. The only direction that it's feasible to go is towards the Linux distro model. It's the most…

I glad to read this. One of my long-term concerns with .NET, compared to other language ecosystems, is the risk that only Microsoft people might know how to build it and port it. Is any distro actually shipping .NET SDK packages built from source?

Re: Reinventing how .NET builds and ships (again)

#105
Why is Microsoft's developer division among the best in the industry while the rest of the company (except enterprise sales) is the literal embodiment of incompetence and enshittification? How have they prevented the pervasive cultural rot from affecting them?

Re: Reinventing how .NET builds and ships (again)

#106

Why is Microsoft's developer division among the best in the industry while the rest of the company (except enterprise sales) is the literal embodiment of incompetence and enshittification? How have they prevented the pervasive cultural rot from affecting them?

Mostly due to politics and chasing the leaders in the industry. The days of looking in the mirror and seeing what they are have been gone since Bill left the job.

Re: Reinventing how .NET builds and ships (again)

#107
post #84
post #18

I have a lot of respect for the .NET team. They often publish great in-depth articles and their pursuit for performance is relentless (e.g. see Kestrel and Entity Framework evolution). And ASP.NET is one of the few large projects which managed to survive a large breaking changes. Almost to Python 2->3 level. You had to change how your web app behaved completely if you relied on their magic session which worked hard t…

I am not sure what the stats are but I am certain they left behind a huge number of projects. Probably a population that won't be very vocal on HN but that doesn't mean they don't exist. Even for new projects there are problems I run into that force me to use 4.8. Like if you build an Excel formula, the mandatory async/await approach just doesn't work. It's not an asynchronous operation and runs into a UI context whe…

On images... I think it might be best to handle a lot of it outside the core... possibly a nuget package that embeds ImageMagick, OptiPng and some other utilities for the purpose of image manipulation in general. The .Net experience itself has always been somewhat poor here.

As to the breaking changes... .Net Core 1.0 was nearly a decade ago... I understand that some people may want to continue running Windows 7 too, but eventually the world moves on and you either update or use a stale version.

The shift to Core and the breakup of a lot of bits comes down to the need to better support running on platforms outside windows... or, .Net itself would have likely died off completely. Most of the .Net projects I've worked on for close to a decade now have been deploying to Linux/Docker... If it weren't for Core/5+ as a shift, it would have been under another language/toolkit entirely.

Re: Reinventing how .NET builds and ships (again)

#108

Modern .NET is awesome. In a small side hustle project, I develop a REST API Backend in C# on my macOS using VSCode, and deploy it to Linux for the past 3 years without any issues. I use SQLite, EFCore, Minimal APIs and it is a delight compared to the frontend part - which is NextJS/React/MaterialUI with 50+ (dev-)packages in npm.

Would suggest taking a look at the FastEndpoints library if you need anything even slightly more complex... just about my favorite for APIs at this point.

A close second would be TS + Hono + Zod-OpenApi and SwaggerUI.. but setting up my context types is slightly more of a pain.

Re: Reinventing how .NET builds and ships (again)

#109
post #3

.NET was a solid choice for backend builds before Node became so popular (And .NET is generally more performant than Node). I hope this churn in .NET builds is temporary because a lot of people might be looking to go back to something stable especially after the recent supply chain attacks on the Node ecosystem.

Since .Net Core 3, I haven't really experienced too many breaking issues that directly affected me... mostly been relatively easy to update my target framework and dependencies. I mean, it's slightly time consuming, but nothing like updating say a React project that's been sitting for even a couple years.

I know their release/LTS cycles are now much shorter than the 20+ years that some framework versions have seen, but keeping things "current" hasn't been that hard. IMO, it's just part of maintenance for "rapid" software development. Companies want software in weeks instead of many years of planning, that means ongoing maintenance work.

Re: Reinventing how .NET builds and ships (again)

#110

Earlier quoted context omitted.

Author of the post here, We wanted the option for distro maintainers to include .NET in the native distro package feeds. This means that distro maintainers have to build the product, not us, and that means creating a build system that meets their requirements. So you either end up with two build systems, or you try and unify. The only direction that it's feasible to go is towards the Linux distro model. It's the most…

I glad to read this. One of my long-term concerns with .NET, compared to other language ecosystems, is the risk that only Microsoft people might know how to build it and port it. Is any distro actually shipping .NET SDK packages built from source?

Yes - Ubuntu, Alpine, Fedora, and others. [1]

[1]: https://github.com/dotnet/source-build/blob/main/README.md#n...

Post reply on HN