We help IT Professionals succeed at work.

Upgrading .NET code from previous versions to .NET 4.5x

LGroup1
LGroup1 asked
on
Sorry as I do not have a .NET background. What does it take to update version 2.x and 3.x .NET code to .NET 4.5x code ?  For example, if a site or client has dozens or hundreds of WWW sites and pages that are or were written in .NET 2.x and 3.x what would it take for those sites to upgrade or update those sites to the most recent version of .NET 4.5x ?   Would it be as simple as installing the .NET 4.5x framework on the Windows Server 2012 / IIS 8.x servers and then migrating and  running the old sites on them ?  Or does one have to recompile all of the older .NET  2.x and 3.x code - fixing and updating errors along the way - to get the code up to .NET 4.5x ?  TIA ...
Comment
Watch Question

David Johnson, CDSimple Geek from the '70s
Distinguished Expert 2019
Commented:
one have to recompile all of the older .NET  2.x and 3.x code - fixing and updating errors along the way - to get the code up to .NET 4.5

1. Why fix what isn't broken?
2. recompile and fix up and change app pool
Commented:
Hi LGroup1,

If you want to upgraded from 2.0  to 3.5  you would be fine.  since 3.5 simply built on top of 2.0.
but  from NET 2.0/3.0 to 4.5 is not perfect without seeing / checking / testing all of your code  conversion work fine. Before moving to production, it should be  thoroughly tested  in the latest framework.

Regards,
Tapan Pattanaik

Author

Commented:
Sorry, perhaps I worded my question wrong as I am not actually a developer.   Does, or better yet should the code from older .NET 2.x and 3.x and ASP pages have to be rewritten or recompiled before moving to a .NET 4.5x platform, or do the .NET and ASP pages just have to be moved over to the new server (Windows Server 2012 R2 with IIS 8.5 in this case) and put on the newer application pool and if they work then they work ?

I am just trying to get an idea of how much time and work would be involved with 'upgrading' dozens of WWW sites and hundreds, perhaps thousands, of pages of older .NET website code.  Just moving the older code to the newer server, putting them on the new application pools, and then testing them seems pretty easy and straight forward.  But if the code 'should' be manually reviewed for known incompatibilities between the older and newer 4.5x  versions or recompiled or in many cases rewritten then that would seem to take much longer and be a much bigger project.

So I guess what I am asking is, for dozens of WWW sites and hundreds or thousands of .NET and ASP pages, would this seem to be a one week 'move and test' project or a months long 'review code, rewrite code, and perhaps recompile code'  type of project ?   And as I am not a developer myself do .NET WWW pages need to be compiled (or perhaps recompiled if and when upgrading) ?

TIA, ...

Author

Commented:
Shouldn't the old  2.x and 3.x .NET projects and code be run through the .NET  4.5 Conversion Wizard first (which apparently recompiles it) ?

TIA<
Simple Geek from the '70s
Distinguished Expert 2019
Commented:
move them to the new server just ensure that it is using the app pool that is appropriate i.e. .net clr v2.0

Author

Commented:
Thanks all,