1

Can someone point out the most common roadblocks when migrating a .net 2.0 app to framework 4.0, if any? (I would expect backwards compatibility, but who knows!) I need to estimate the effort of making an asp.net 2.0 app run in framework 4.0 with as few code changes as possible.

Thanks in advance!

alf
  • 18,372
  • 10
  • 61
  • 92
  • 1
    I've done it a few times and I don't know of any. The wizard runs, makes a few changes to your csproj file and you're off and running. Of course you'll want to take advantage of the 4.0 features going forward...but it's remarkably backwards compatible from what I've seen. – George Mauer Nov 09 '11 at 22:26
  • @GeorgeMauer, there's a difference between migrating from one version of VS to another and migrating from one version of the framework to another. Namely, newer versions of VS still support older versions of the framework. – svick Nov 09 '11 at 22:38
  • 1
    @svick Absolutely. The upgrade wizard actually changes the framework used though. alphonso - I think we're saying try it right now. It might be only a few minutes worth of work. – George Mauer Nov 09 '11 at 23:01

3 Answers3

4

When i upgraded an old intranet site from 2.0 to 4.0 the only thing that broke was Crystal Reports.

The site was medium size and nothing was found to have been broken, it has now been about 3 months since then and nothing has been reported as of yet, so it should be fine unless you have some 3rd party libraries that depends on legacy code in .net 2.0 which would require you to have an extra line in the web.config to allow access to legacy 2.0.

<startup useLegacyV2RuntimeActivationPolicy="true|false" > </startup>

Joakim
  • 2,217
  • 15
  • 20
  • That flag may only help if the problematic dlls are mixed mode ones: [link](http://stackoverflow.com/questions/1604663/what-does-uselegacyv2runtimeactivationpolicy-do-in-the-net-4-config). I have Crystal and even ESRI MapObjects (GIS). This flag didn't magically solve my MapObjects problem [link](http://stackoverflow.com/questions/15748509/system-typeloadexception-referencing-net-1-0-assemblies-after-net-4-0-migratio/). I just want to warn. I wish smooth transition to anybody. – Csaba Toth Apr 02 '13 at 21:15
1

There are very few (if any) issues in upgrading .NET versions. The biggest problems you might face is migrating Visual Studio versions, but even that's usually painless.

You could even go back to an older version of .NET if you want - obviously then you'll need code changes to remove any new features you've used.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
0

I've upgraded multiple projects from 2.0 to 3.5, and then from 3.5 to 4. I never had a single problem with the upgrades. I did like to first upgrade the solution from 2005 to 2010 first and then actually change the framework version, but you may get better mileage with a different method.

Daryl
  • 18,592
  • 9
  • 78
  • 145