0

I'm working with one of my clients wherein they are having a few application still written on .net framework 3.5. Though we still have support for .net 3.5, client wishes to upgrade the framework to 4.8. There are no plans to migrate to core/.net 6 as of now but to upgrade to framework's latest version 4.8.

I'm looking for some pointers to migrate an application from 3.5 to 4.8, what could be the runtime changes/retargeting changes/breaking changes. It would be of great help if someone could give me a roadmap to address the problem - where to start from, what details to look into etc. I searched a lot and could not get any specific pointer for my use case. Please help.

Thanks in advance!

1 Answers1

2

Well, in most cases, you should be able to simple set the project up to say .net 4.8 (or 4x). But, you might as well go all the way.

You WILL however has to download and install .net 4.8 on the web server. So, on your developer computer, you most likly do have .net 4.8. But, don't forget to download + install .net 4.8 on the web server (or if it is a hosted plan, find out what is the level of .net they support).

So, for the most part, you should be able to simple in your project, set it as 4.8, and see if it compiles. You have a VERY good chance it will.

That would be this setting project->"my project name properties"

enter image description here

So, the above for the most part should make things work.

Also, once you done the above, (then re-build all). You want to check web.config, and this setting:

<httpRuntime targetFramework="4.8" maxRequestLength="2000000"/>

As noted, you also have to check/ensure that the web hosted server (if this is not a on-site server) also needs the .net frameworks to be downloaded and installed. Often they already are but you want to check that.

It also possible that you are using a asp.net web site as opposed to a asp.net web site application, and thus the above steps do change somewhat.

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51
  • @Albert-d-kallal - Thanks for responding. Is there any document which mentions about the changes in API/Assembly from 3.5 to 4.8? I understand that changing the framework in config should work, but how about the chances of the application not building successfully after the change, how to quantify what specific things in .net3.5 won't work in .net4.8? – Subhajeet Paria May 20 '22 at 07:51
  • Not aware of such a document. Try 4.8 for testing. A few hours trying the features of the new build and see how it works. Unless you "very" lucky and developers built a lot of unit tests, then you have to run the application, and test features and operations of the web site. Depending on what the web site does, the first test would be to run the project from VS on your dev box. Then of course one certainly would consider to run a full IIS server on your dev box (I have 15 VM's on my dev box, including several servers like 2016 running IIS). Typical everyday developer setup should suffice here. – Albert D. Kallal May 20 '22 at 14:52