tags:

views:

927

answers:

5

I'm developing an application that is targeting the .NET 3.5 Framework. The application's setup installs the .NET 2.0 runtime on the target machine. So far I haven't had any issues with doing this, but I'm wondering what problems I'm going to have down the line. Do I need to be installing the 3.5 runtime?

I must package the .NET runtime installer into our installation (no network install). The size of the runtime installer is the issue. The .NET 2.0 runtime installer is 23MBs (manageable), the .NET 3.0 runtime installer is 50MBs (getting big) and the .NET 3.5 runtime installer is 200MBs (yikes!). What the heck is in those extra 170MBs?

+1  A: 

This is a tough question to answer, because ultimately it depends on what .NET 3.5 features you are using. If you are using some of the new libraries, such as LINQ, then yes, you'll need to install the 3.5 runtimes. However, if you are just using some of the new syntatic sugars introduced in 3.5, you may not. The reason for this is that .NET 3.5 is 100% compatible with the 2.0 CLR.

Matt
+1  A: 

If it's a client app that doesn't use asp.net etc you may be able to use the .Net Client Profile install which is much smaller (c. 26MB) - further details at:

http://blogs.msdn.com/bclteam/archive/2008/05/21/net-framework-client-profile-justin-van-patten.aspx

http://www.hanselman.com/blog/SmallestDotNetOnTheSizeOfTheNETFramework.aspx

Whisk
A: 

If you're referencing 3.5 specific libaries such as System.Core or System.Xml.Linq then you'll need to ship 3.5.

Kev
A: 

there is some différence in the generated code part of datasets between 3.5 SP1 and 3.5 (no sp), something about serialization. you may have trouble with this if you upgrade your installation to 3.5SP1, even in the core functionalities.

A: 

.NET 3.5 is not literary 100% compatible with .NET 2.0, but with .NET 2.0 SP1.

But I don't know if that will give you any problems. The .NET 2.0 SP1 update is said to be made to make Extension Methods and maybe Automatic Properties available (don't remember specifics).

Scott Hanselman has a good blog post on this.

As for the size of the .NET 3.5 deployable file is that it's .NET 2.0, 3.0 and 3.5 for x86, x64 and the other 64-bit architecture in one big file.

Seb Nilsson
and 2.0 SP1 and 3.0 SP1!
Lucas