News for hackers. Stuff that matters.
Re:20 Years of .NET by smarx007 on Monday February 14, 2022 @08:22AM (#30331674)
Is there an up-to-date guide for migrating from .NET Framework 4.8 to .NET Core 6.0 (or whatever the latest LTS is)? I guess many projects have not yet migrated, especially libraries that wanted to stay compatible.
Re:20 Years of .NET by jve on Monday February 14, 2022 @09:09AM (#30332153)
.NET 3.5 SP1 support ends Jan 9, 2029. For .NET 4.8 there currently there is no support end date. Don't think it's gonna be sooner than 3.5.

> .NET Framework 4.8 is the latest version of .NET Framework and will continue to be distributed with future releases of Windows. As long as it is installed on a supported version of Windows, .NET Framework 4.8 will continue to also be supported. https://dotnet.microsoft.com/en-us/platform/support/policy/d...

I think for new apps, you should choose .NET Core. But for legacy apps, I suppose you can take your time. .NET Core actually has much shorter LTS lifecycle. Only 3 years: https://dotnet.microsoft.com/en-us/platform/support/policy/d...

In our case, a fairly big monolith .NET 4.8 web app is being migrated to .NET Core by splitting that monolith into microservices that run on .NET Core. Can't say if it is for better or worse, more moving parts in infrastructure for sure.

Re:20 Years of .NET by NicoJuicy on Tuesday February 15, 2022 @11:46AM (#30348951)
Put the API behind a gateway and migrate the modules to the .net core API.

( Doing something similar, but I'm not going to go with Microservices)

Re:20 Years of .NET by mattferderer on Monday February 14, 2022 @09:22AM (#30332322)
It really depends on your project & how your code is split up. A lot of business type logic code should be identical.

I've migrated a couple decade plus old web form projects. A lot of the business logic can be moved to .NET Core 6 verbatim. I'll often set up a new version & slowly proxy web requests from the old site to a new version of the site as we update it.

Re:20 Years of .NET by throwaway6532 on Tuesday February 15, 2022 @05:16PM (#30353607)
Upgrading usually requires an enormous amount of remediation work before it's even possible. Generally you can do it like this - convert to PackageReference style NuGet packages (this one alone may even be a blocker if you have certain unfortunate dependencies which aren't compatible with PackageReference), upgrade all your dependencies to a netstandard2.x compatible version (this is often brutally difficult in a big system and you may have to replace certain dependencies outright), start swapping out DI / Logging etc with the netstandard equivalents found in .NET Core, create a new .NET Core solution file and try to compile your project to see what breaks and fix any remaining issues.

Having done this it does work, but it's fairly time consuming and for larger apps virtually impossible without massive buy-in from the business.

Re:20 Years of .NET by jcon321 on Monday February 14, 2022 @08:26AM (#30331712)
From my understanding, that's not really a migratable stack. Depending on what you're doing in 4.8 (aspx, wpf, aka windows only type stuff) there's not a direct migration. It's more of a re-write.
Re:20 Years of .NET by jbergens on Monday February 14, 2022 @09:52AM (#30332654)
I think you are only kind of right. aspx is over 10 years old, you should have switched to .NET MVC already and then the difference to .NET Core is small. We rewrote some things at an earlier company and there mostly general things like auth and where to get querystring variables and similar that had changed.

If we look at WCF to REST (or gRPC) it is also mainly easy since it is some general configurations and infrastructure things that have changed but most of the business logic will work. So you have to rewrite but it might be quite easy. And doing this once every decade is not that strange. Also remember that most of the old things still work. You can stay on those tech stacks for another couple of years if you feel that is better for your organization.

Re:20 Years of .NET by electroly on Monday February 14, 2022 @10:07AM (#30332855)
WPF wasn't left behind. It's still supported in .NET 6, you don't have to rewrite anything. Windows Forms, too. Can you be more specific what you mean by aspx? ASP.NET is, of course, still supported.

https://docs.microsoft.com/en-us/dotnet/core/porting/net-fra...

Re:20 Years of .NET by hackerfromthefu on Tuesday February 15, 2022 @08:00AM (#30345839)
Aspx is the file extension of Web Forms pages, which have no direct migration path to .net core/6.
Re:20 Years of .NET by electroly on Tuesday February 15, 2022 @11:42AM (#30348895)
Ah, of course. Thank you!