9
votes

I have code/support an application built on .NET framework that has always run on .NET 2. This year we are upgrading the application to use .NET 3.5 (or 4?).

In preparing for this change we noticed that that Offline Installer (required for our customer base) for .NET 3.5 is 200+ MBs bigger than the .NET 4 offline installer.

Here are my questions.

Why is the dotnet 3.5 installer so much bigger than the 4 offline installer?

Can we TARGET .NET 3.5 but distribute .NET 4. In other words, is .NET 4 backwards compatible? Assuming that .NET 4 was the only installed .NET could application still target earlier frameworks?

IF our application is compiled for x86 CPU (rather than Any CPU) do you still have to distribute the x64/x86 Client Profile or can we just distribute the x86 Client Profile? In other words, can we distribute the x86 Client Profile even though it will be installed on x64 machines if our app is compiled for x86 target CPU? Any risks or gotchas for doing this?

The issue is that if we upgrade our app to target .NET 4 there are a lot of application servers that we also have to upgrade which effects a number of other applications. Any thoughts?

Seth

2
good question, I wondered the same thing myself :)Tom

2 Answers

9
votes

It is because of the prerequisites. The .NET 4.0 installer requires the target machine to be updated to

  • XP SP3
  • Vista SP1
  • Server 2003 SP2
  • Server 2008 or Win7

The 3.5 SP1 installer is much more lenient, it can even run on the original version of XP. To make that work, it needs to include updates of many of the core Windows components. A significant chunk of that 231 MB installer are not actually .NET components.

Also notable is that in .NET 4.0, the difference between the client profile and the full version has largely disappeared. The full version is only 15% bigger, there isn't much point in targeting the client profile.

3
votes

.NET 3.5 is fully backward compatible with .NET 3.0 and .NET 2.0 - it thus includes all of those two previous versions as well. .NET 4.0, on the other hand, starts from scratch, and can discard deprecated/unnecessary code. This also means that .NET 4.0 cannot necessarily run .NET 3.5 code unchanged - there's another SO answer on some of the breaking changes there.