.NET n00b seeking sage advice and/or tales of caution from wiser devs

Hey all,

New to the forum, but have been watching the show for a year or two now. Judging from the show and what I’ve seen on the forum so far, I figured this community is a better place than most to look for some good advice.

The situation:
I was a hardware tech that was recently promoted to an App Dev position maintaining a set of a dozen or so .NET Framework apps. I’ve been slowly piecing together what each app does and have been able to fix some bugs, but I’ve discovered that we’re running apps on Framework versions as old as 4.5. Per MS, that version is EOL and to me…that doesn’t feel safe so I want to do something about it. It could be overly cautious of me?

My “ideal” goal:
My ideal goal is to set up the apps to all target .NET 6.0, for the long-term support and newer runtime. I’m aware that Framework 4.8 is supported but…I don’t know if I trust that. I plan on trying to follow this track for the web-app portion and then…google the server side stuff.

Why I’m bringing it here:
Unfortunately, because of the company I work for, I don’t have a Senior dev that can help correct any mistakes. I’m the only one who does what I do, and I’m still learning my job. For that reason, I am pro-actively seeking some guidance or tales of caution from the community as to the scope of this kind of endeavor before I start actually breaking things. Most of the apps are used on a daily basis, and our business is scrapping together as much data as they can to keep up with the economy, so down time is not met with very happy people :woozy_face:.

N00b questions:
Is my “ideal goal” a good idea? Should I upgrade them all to .NET Framework 4.8 first, and then go .NET 6.0, or is it better to just shunt them all to the most recent version right away? Are there benefits or concerns to just leaving them on Framework 4.8? Does anyone have any valuable resources to that end or mistakes they made that I should avoid? Am I being overly cautious?

I’m eager for your thoughts. Thanks in advance for any help you can offer!

Given that I still see fairly regular updates for .Net 4.8 in Windows update, I would say that it is still actually supported.

However, moving to .Net 6.0 would be a good goal, as there are other benefits than just support for moving to newer versions.

I don’t have much experience with web applications, I’m more familiar with desktop applications/libraries. So this probably applies to desktop applications/libraries more, and could be different for web stuff.

Moving to .Net 4.8 first is probably a good call. There are generally not too many issues moving from .Net 4.x to 4.8. Then, once on 4.8, you can update/replace an external nuget packages or libraries the application is using with ones that target netstandard 1.x/2.0 (or both .net framework and .net 3/5/6). That way, you can break the update into two parts, one where you update external libraries/packages (and get everything working), and another where you update the application’s codebase.

1 Like

I moved from 4.7.2 Framework - which I was using for everything to .NET 6.

I would add this - Framework is pre-installed on Windows machines NET isn’t, so for Desktop this won’t apply - unless you can get everyone in your company to install NET 6 (I did that, but it was painful), but for web based applications, it is different as you don’t require that the framework is installed on the user machine.

I would skip 4.8 and just go to NET 6. There is no reason to go to 4.8 and every reason to skip to 6, it is hella faster.

Also, you would just be duplicating work, first doing the work to get to 4.8, and then doing it all again to get to 6.

The first time you move to 6, it will be a massive pain for you - but the second one, and the third etc. It will just keep getting easier.


How are you deploying them?

Are you using containers on windows … or something else?

We still have our older version of our web software running on 4.6 (hosted in IIS), but with the software being so old and large there ended up being so much we wanted/needed to change that it quickly started to look like it was going to be easier and faster to just start over and call it a 2.0. And I was right… it was faster and easier… at least in our case with all the hindsight we’ve accumulated over the last 11 years. We also eliminated a bunch of libraries, simplified a ton of stuff, made everything just so much faster, and it’s all containerized now. But again, this was due to 11 years of experience.

So in terms of porting old stuff over the the new stuff I’m not that much help. However, I can say that .NET 5 and 6 is well worth moving to. Things are just so much better and you get some performance improvements.

If you had more experience I would have suggested leaving the apps as they are and start again. Possibly even combined the apps, where it made sense, into a single app/platform. And then also use web as that removes all the effort of having local machines up to date AND having it be web means you can access it with anything that has a browser. A lot of our clients love this as they can get rid of windows licenses and switch to Linux instead. End users don’t care as long as they can easily get to the browser.

However, porting the existing apps over will be good practice and learning opportunity. You’ll also gain some valuable knowledge as you start to get a good feel for the existing apps and what they do and how they do it. Then apply that new knowledge when making something better further down the line.

If the apps are fairly simple I don’t think you’ll have many issues. If the apps use Entity Framework, then you might need to redo some things here and there if you move over to Entity Framework Core. You can stick with Entity Framework 6.4.4 which still has support for security fixes and will probably still be around for a while and should be a drop in update even if the rest of the app is .NET 6. MS said they will give 12 months notice if they plan to stop support for 6.4.4 completely.

Don’t be afraid to upgrade. Once you’ve done one app the other’s should be way easier. But use some kind of source control (Github or Gitlab) and use branches or even fork the old project and then do the whole update/upgrade on that. Most importantly, learn as much as you can and at some point you will want to redo things.

If you get stuck, you know where to come and ask.


These are webapps, so (also to @Joe_Bloggs1 's point) fortunately I would not have to touch any end-user devices and install .NET 6.0 runtime on them. It’d just be the webservers they are running on that I would need to upgrade, and that doesn’t seem too hard.

@Joe_Bloggs1 appreciate the encouragement! It may be that I adopt that path with some of the simpler apps, and once I’ve gotten through the first few apps.

@TheCakeIsNaOH thanks for the input! Breaking it into steps will probably also allow me to get a more focused understanding of those two areas - codebase and external libraries. There’s certainly a lot I have to discover there.

Cool ,it’s already all web. One less thing to worry about :+1:

Very glad you mention that - I think every one of them is using Entity Framework for sure. It sounds like. And, yes, on web saves me a lot pain it sounds like!