Scott Hanselman

Towards a Smaller .NET 4 - Details on the Client Profile and Downloading .NET

April 21, 2010 Comment on this post [35] Posted in VS2010
Sponsored By

NOTE: All this info is for programmers/developers. If you just If you want .NET just to run stuff, just go get the 800k Web Installer for .NET 4 and you're all set. It'll do the rest. Now, that said...

Almost two years ago I blogged about how Microsoft was trying to make the size of the .NET Framework smaller and smaller. That day I made a site called http://www.smallestdotnet.com to help folks find the smallest download possible for their system.

I just noticed a post on the WPF Perf and .NET Client Profile blog that goes into a LOT of detail on how the .NET 4 Client Profile makes things smaller.

Before, the .NET 3.5 SP1 Client Profile was a good idea, but it wasn't really a first class citizen. It wonly worked on x86 and machines that didn't have .NET on them already. Some amount of time you'd end up having to get the full .NET install anyway. They say the focus on .NET 4 is on getting Client Applications to run as fast as possible with as few bits as possible.

Check this out from Jossef Goldberg's blog: "Unlike the NET 3.5 SP1 Client Profile, NET4 Client Profile is:"

  • Supported on all OS that Full is
  • Supported for x86 & x64
  • Client Profile is *the* framework that will be available on Windows Update for desktops
  • Supported in all aspect of VS (e.g. targeting, deployment project, etc)
  • Is the default target in almost all VS10 Client Project Templates (Winforms, WPF, VSTO, etc)

So that's good to know. They are committed to this and this will be the .NET 4 that gets distributed via Windows Update later this year. The general idea is that they avoid installing things you don't need a client machine. That means they won't install ASP.NET on your Mom's computer just because she wants a game. Also, the .NET 4 Client profile is a proper subset of the .NET 4 "Full" Framework.

Here's the numbers:

 

3.5 SP1

4.0 RTM

32 bit Client Profile

Online: 28 MB
Offline: 255MB
28.8 MB
32 + 64 bit Client Profile N/A 41 MB
32 bit Full N/A 35.3 MB
32 + 64 bit Full N/A 48.1 MB
32 + ia64 bit Full N/A 51.7 MB
32 + 64 + ia64 bit Full 231 MB N/A

And the chart. Seems like a return to simplicity. I'm glad they're listening. I remember harping on this, as I'm sure you did, Dear Reader, over the last few years.

image_2

On to the where...

Downloads - Where can I get the NET4 Client Profile?

One more time, know that this info is for developers. If you want .NET just to run stuff, just go get the 800k Web Installer and you're all set. It'll do the rest.

These downloads are for folks who might want to redistribute the .NET 4 Framework with their software, perhaps offline.

  • Both x86 and x64:
    • Client: dotNetFx40_Client_x86_x64.exe (41 MB): This is the Client Profile SKU that you must install on any supported 64-bit OS. This will also install on any supported 32-bit OS. Your app could run in WOW64 if it was compiled w/ "32-bit" flag or as 64-bit if you compile with "AnyCPU" or "64-bit" flags.
      If you are redistributing the Client Profile with your application you most likely want to redist this package as it can install on both 32 and 64 bit OS’s.
    • Full: dotNetFx40_Full_x86_x64.exe (48.1 MB): This is the Full Framework SKU that you must install on any supported 64-bit OS. This will also install on any supported 32-bit OS.
      If you are redistributing the Full Framework with your application you most likely want to redist this package as it can install on both 32 and 64 bit OS’s.
  • Just x86:
    • Client: dotNetFx40_Client_x86.exe (28.8 MB): This is the Client Profile SKU that you could use to install on any supported 32-bit OS.  Choose this only if all your users are running 32 bit OS. (in most times this will not be your case…)
    • Full: dotNetFx40_Full_x86.exe (35.3 MB): This is the Full Framework SKU that you could use to install on any supported 32-bit OS. Choose this only if all your users are running 32 bit OS (in most times this will not be your case…)
  • Full Web Bootstrapper for Online Scenarios:
    • NET 4 RTM Web Bootstrapper: This is what you want to install if you need NET4 Full and you are online. This will detect your OS and processor architecture and will install the appropriate Framework.
  • Client Web Bootstrapper for Online Scenarios:
    • NET 4 Client Profile RTM Web Bootstrapper: This is what you want to install if you need NET4 Client Profile and you are online. This will detect your OS and processor architecture and will install the appropriate Client Profile.

Enjoy.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
April 21, 2010 3:53
Just curious if the full offline installer included all languages, or is just an ENU release only?
April 21, 2010 3:58
The problem that I have with the Client Profile.... Is that System.Design is not included, but is a dependency on every component library, DevExpress, Infragistics, etc that is referenced in the solution. Though the namespace may not even be used in the released product, VS 2010 prevents even building a debug project with such a dependency.
April 21, 2010 4:23
Dan - I'll check on that.

Wes - Interesting. You're saying by using any component lib out there today, that then precludes use of the Client Profile? That seems wrong. I'll check.
April 21, 2010 4:29
While I agree .NET 3.5 and 3.5 sp1 were getting a bit ridiculous. I don't see a benefit to the client profile of .NET 4 over full .NET 4 when there is such a small size difference. This is just going to add developer headache and deployment problems especially for internal apps where it is more likely a simple xcopy deploy or similar.

For instance I currently have a reporting dll that can be used on both our internal winforms and web applications so it references System.Web something I couldn't change even if I wanted due to a dependency on third party code. Now if I switch to .NET 4 I will have to get the full profile installed on all machines. System.Design causes a similar issue for some and i'm sure there are other namespaces for other people.

This is a real developer pain for very little benefit to any end user. Up until now .NET has been a very straight forward deploy due to windows update and general forward thinking in it's development it's a shame it has to be ruined now.
April 21, 2010 4:34
Also DevExpress had to adjust their code to remove System.Web dependencies again due to shared code between their win and web components and not wanting to leave their developers needing full client .NET 4. I would guess the situation is the same for infragistics, telerik....
April 21, 2010 5:11
Thank you guys for the comments. We really appreciate the feedback.
Many of the concerns raised are already discussed in the blog (See:
"What’s new in .NET Framework 4 Client Profile RTM"

As my blog says, there are other benefits to NET4 Client Profile especially to end-users other than size:
“The main reasons are not just better deployment size/time but also:
• Reduce the Framework deployment failures.
• By keeping ASP.Net and other components (that are mostly needed for servers) out of the Client Profile, we can reduce the attack surface and the number of future servicing events which may be caused by server component (such as ASP.Net) and are not needed for desktop scenarios.
• Making NET4 Client Profile available on Windows Update will make sure that most desktop machines will include NET4 Client Profile over time and apps that target the Client Profile will not need to carry or install the Framework which will improve the overall deployment experience.
• Enable us to add features and grow the size of overall Framework in future versions but still have a smaller core.

I am sure folks do not want the size of the future frameworks to grow back to 230MB+, having a small Client Profile will allow us to keep a small core.

System.Design is not included in Client Profile b/c it is not needed during run-time, it is only needed during design-time (for which you need Full).
The root cause of this issue is that some component did not have an optimal architecture and did not separate to a design-time and run-time components. Blog have an example eon hot to do this separation.

Per my blog:

4. My controls or 3rd party controls is now showing in the VS 2010 toolbox
Some VS 2008 3rd party Winforms controls will not work with VS 2010 NET4 Client Profile projects.
The reason is that some of these controls have do not have separate design-time and run-time components and have dependencies on assemblies that are in the Full Framework (for example dependency on System.Windows.Forms.Design.dll which is Full).
In VS 2010 RTM we made some changes to make it easier for developers to realize that.
Per the image below you can see that the VS 2008 DevExpress Winforms control are not showing in VS 2010 Toolbox and instead you see the message “Controls in this category are unavailable for the .NET Framework 4 Client Profile. To change this setting, open the Project Properties windows.”
The Xceed VS 2008 controls on the other hand do have separate design-time and run-time components and works fine in VS 2008 and VS 2010.
The good news is that many of the control vendors plan to release update to their control soon after VS 2010 RTM. Until such updates are available you need to retarget your project to NET4 Full if you must use these controls.

6. I want to write a custom WinForms control, what do I need to do for it to work with NET4 Client Profile?
“When developing Windows Forms control libraries, it is necessary to separate the runtime code from the control designers in order to target the new Client Profile. If the assembly references classes that exist in the Full framework but not in the Client Profile, the project will not compile successfully. Custom control designers usually inherit from the System.Windows.Forms.Design.ControlDesigner class in System.Design.dll, which is not included in .Net Framework 4 Client Profile.
We posted a guide that can walk you through the steps of creating a Windows Forms control that can be used in the .NET Framework 4 Client Profile. See: http://code.msdn.microsoft.com/WinFormsCustomCtrl
Note that WPF custom controls do not inherit from classes in System.Design.dll and do not have this issue.

WRT System.Web.dll, keep in mind that you can continue and target NET4 Full if you need it. We are not preventing developers from targeting the Full Framework, we mainly made it easier to use the Client Profile. Especially in a controlled, enterprise environment we still expect organization to deploy NET4 Full.

Hope it make sense.
Jossef
April 21, 2010 5:24
WRT , "Just curious if the full offline installer included all languages, or is just an ENU release only?"-> No, Full only include ENU. Language pack will be available shortly. As a matter of fact JPN, GER, FRA is already on MSDN.
e.g. http://msdn.microsoft.com/de-de/library/dd831853.aspx
April 21, 2010 7:54
There are always little lies about latest and greatest MS technologies. In this partucular case MS focuses on download size but what about total installation experience? Sure download size matters. But why nobody cries that installation still sucks? 30 minutes plus reboot (are you serious?!!!) to preceed instalation of my 2MB app? Really?

My verdict - I will be definetely not using this framework for our applications until someone increase its marketshare. Sorry. Don't get me wrong. I appreciate your attempt, but it is still not good enough.

April 21, 2010 8:40
Dmitry - I'm sorry you feel there are little lies. I'm not seeing 30 minute installs on my machines, more like 5-8 minutes, but perhaps I'm running faster computers. I'll do a few more tests on my wife's computer.

As far as marketshare, perhaps this will help:

* Well over 90% of the PCs in the world have some version of the .NET Framework installed.
* Over 65% of Windows PCs in the world have .NET 3.5 SP1 installed.

This number is increasing each month.
April 21, 2010 9:35
Does the .Net 4 installer include any of the files for the previous versions?

If i have an app designed for, say, .Net 2.0, will i still have to install .Net 2.0 or .Net 3.5sp1?
April 21, 2010 11:14
@Jossef

When all the language packs are available will I need to follow similar steps described here to create a full localized offline installer?
http://blogs.msdn.com/astebner/archive/2008/07/17/8745415.aspx

Thanks,
April 21, 2010 17:57
I had two issues so far that are driving me nuts with the .Net4 thing...

First, why do I have to download and install the Windows Imaging Component (WIC) to install it? When it tries to run dotNetFx40_Full_setup.exe, it bombs out saying that without WIC it can't install. Seems odd I need to install that to install .Net 4.0, at least to me.

Second, why in MS Server 2003 if I switch a virtual directory to use the .Net 4.0 it requires a restart of IIS? At least it was on a dev server that I had to do that with, but in production that throws a kink in my plan that now I affect every other app on that server just by trying to install a .Net 4.0 app.
April 21, 2010 23:49
Yea, just to echo Drewfus above: it's very convenient for us I.T. folk to have one installer that installs all versions as we do now with the .NET 3.5SP1 installer. Would be grateful to see a MS blessed all-in-one installer released sometime. Not really a big deal to dist a 500MB package as part of a roll-out.

Attack surface may arguably be greater [not really sure about that, since .NET is not "running/listening" per se], but it's just much easier to always install the full package. Maybe it's easier for some malware to dynamically load from some locally available procedures, but reality is if malware is already running it will just download what it needs. And really, those guys and gals always hit up the unmanaged code anyway.
April 22, 2010 3:28
@Drewfus:
.Net 4 installer include and overwrites handful of files that were also included in 3.5 SP1 (what we call “Shared Components”) , this is mainly mainly a ‘shim’ that directs the loader to load the right Framework version .

For all purposes Net4 is a complete Side-by-Side that does NOT include any previous NETFX versions. This is one of the reason we were able to simplify NET4 and reduce size.

If you have a .Net 2.0, nothing really change, you can still install .Net 2.0.
Since .Net 3.5sp1 includes NET 2.0 you can also install 3.5 SP1. Technically 3.5 SP1 apps can also run on NET4 with an app.config switch, but I would not recommend this w/o testing.

@Dan:
"When all the language packs are available will I need to follow similar steps described here to create a full localized offline installer? http://blogs.msdn.com/astebner/archive/2008/07/17/8745415.aspx"

I have to check , but I believe that yes, same steps as described in blog for 3.5 SP1 . Note that setup will attempt to install the right LangPack from you if you install on non-ENU machine.

@Jeffery:
WRT Windows Imaging Component (WIC):
Since most machine already have WIC (...WIC is already included in XP SP3, Vista/W2k8, Windows 7/W2k8 R2) and many other machines got WIC when they installed .NET 3.5 SP1, it made sense to remove it and decrease setup size for almost all users that really do not need it.

@Jason:
Please note that if you install Net4 Full you are already getting NET4 Client Profile . NET4 Full is a superset of Net4 Client Profile. E.g. NET4 Full=NET4 Client Profile + “Extended”

Also , to repeat Scott’s comments: ,
- Over 65% of Windows PCs in the world have .NET 3.5 SP1 installed.
- US market share for .NET 3.5 SP1 is ~80% and in some countries this market share is over 90%!

We don't expect everyone to jump on NET4 right away, but you can expect NET4 penetration rate to grow quickly similar to NET 3.5 SP1.
A smaller, more reliable NET4 Client Profile should help achieve that.
April 22, 2010 3:59
Thanks Jossef.

I will continue to build images with .Net 3.5 SP1 and now also include .Net 4.

Do you or anyone have any statistics on the proportion of .Net apps that require each Framework version?
April 22, 2010 5:56
Scott, first of all I'd like to apologize if my comment yesterday seemed insulting.

I was kind of frustrated recently because from my view overall installation experience for .NET 4 is worse (not much, but worse) than the one of .NET 3.5 SP1. Sure, full installation package was huge for 3.5SP1 but not so huge as you know better that anyone (smallestdotnet). And I could play with customized installation packages for different configurations, supress rebooting, so total exerience for customer would be greatly improved.

Right now I should start this game again. I have to wait until some blogger (maybe you?:)) will publish some tips what causes restart and how to suppress/prevent it. Other blogger will suggest some other improvements which I will have to verify/implement. And so on, and so on.

Which brings me to my main reason of frustration. Isn't this a Microsoft job to provide developers not even tips, but comprehensive and robust tools to customize installation of .NET 4 for all possible scenarios from day one? Along with hundreds of reports how download size is low (believe me, we noticed) why nobody even care to explain why it needs to restart computer for we explain it to our customers? Why everyone are comparing 50 MB with 250MB knowing that real download size for .NET SP31 was not more 70MB, and in many cases much less?

I know that MS team made huge efforts to keep download size low. I really want to express my appreciation for that.
But we are not marketing people. We are developers. We still have to fight real problems like rebooting of OS and slow unpackaging on cheap HD drives.

It would be very appreciated too if MS be mored focused on helping in problem areas along with promoting their achievements.
April 22, 2010 7:50
Many MANY thanks for this! I spent almost 2 solid days trying to find an offline installer for .Net Framework 4 last week without any success. Everything just kept linking back to the bloody web-based 'full' installer page.

Web based installers as a default are fine but I almost got the feeling whoever it is that has such powers made a conscious decision to hide the offline installers and push as many people onto web-based installers as possible.

/rant
April 22, 2010 7:51
Thanks Jossef.

April 22, 2010 8:52
Dmitry - I'll go try to find the folks who know this stuff and do a post on why reboots happen and how to avoid them. Can you give me a list of the topics in this area you'd like me to dig into?
April 22, 2010 16:26
Well, targeting the client profile from a component vendor's perspective is a royal pain in the neck. You need to rewrite all design dependent code to use reflection. And then you'll find yourself in assembly hell - how on earth are you supposed to write an editor for a type that is contained in a different assembly? Well - yes you may reference the "main" assembly from the design assembly but this is where the fun starts - copletely identical types from identical assemblies just located on different paths (like the "local" copy performed by the typical compile) fail to work together, as they're loaded in different application contexts. We had to resort to offering a "poorly designable" Client Profile assembly that issues a warning that you should actually target the full framework at least for design purposes...
April 22, 2010 16:45
@Jossef I'm aware the full installer comes with the client profile.

I guess I wasn't clear enough; what I'm hoping for is (like is already available with .NET3.5 SP1) an integrated installer that includes ALL .NET versions. That means one runs a single msi and get .NET 1.1, 2.0. 3.0, 3.5, and 4 with the latest service packs. At this point I don't see much reason to install 1.0.

*shrug* For now I guess it's just another line in a batch file....
April 22, 2010 22:39
@Dan:
WRT LangPack, I wanted to correct my statement from before and clarify, we have corrected some of the LangPack issues w/ 3.5 SP1:
1) If NET4 installed from Web via Web Installer – bootstrapper will also install LangPack (like 3.5 SP1 did)
2) If NET4 installed via redist package , (e.g. from DVD) then we no longer install LangPack (unlike 3.5 SP1)

@johnb2007:
You said : “Well, targeting the client profile from a component vendor's perspective is a royal pain in the neck. You need to rewrite all design dependent code to use reflection....”

My blog points to an example that shows how you could separate your controls to design-time & run-time component, it walks you through the steps of creating a Windows Forms control that can be used in the .NET Framework 4 Client Profile. (See: http://code.msdn.microsoft.com/WinFormsCustomCtrl )
Was this sample not sufficient ? how would you like us to improve it?

@Dmitry:
We are aware that many NET4 installs causing a reboot. We are working on a GDR that will be downloaded via Windows Update in the near future . Among other things this GDR will also address many of the reboot causes, so stay tuned.
April 23, 2010 2:32
By not including at least .Net 3.0 and .Net 3.5 SP1 with the .Net 4 installer, it looks like Microsoft is more interested in marketing the smaller download and attack surface 'features' than they are in program support.

Is it a hint that all earlier Frameworks are to now be regarded as legacy?

Really, by requiring people to install both 3.5 SP1 and 4, the points made in this post about the new installer are really moot, for a few years...

I'm with you Jason Gurtz - lets have an all-in-one installer, and if some of those earlier Frameworks have reached end-of-life, then leave those out and make it explicit as to why.
April 23, 2010 2:45
Drewfus - Wait, who said anything about installing .NET 3.5SP1? That's not a requirement of .NET 4. To be clear, .NET 3.5 is NOT a prerequisite of .NET 4.
April 23, 2010 4:49
@Scott I don't think Drewfus was implying that. More like if you find an XP or Vista machine with no windows updates really you need to install multiple .NET versions to make sure all programs will run.

For non programmers this looks a little odd as 1, 1.1, 2, 3, 3.5, 4 are understoood like app version numbers so surely version 4 is able to run everything from previous versions like Microsoft Office can open files created in earlier versions. Hope that makes sense.
April 23, 2010 10:02
Does this mean that one no longer requires an Administrator account to install .NET 4.0?

If so, which of the deployment options can be done on a limited account? The web installer as well? What about a separate Client Profile installer, ie neither Windows update nor the web installer?
April 24, 2010 7:59
Scott, my phrase "by requiring people to install both 3.5 SP1 and 4" is ambiguous. I understand that .Net 3.5 SP1 is not a prerequisite for .Net 4. What i meant was - "comprehensive .Net program support will now require two Framework installations, .Net 3.5 SP1 and .Net 4."

Now why doesn't .Net 4 include some or all of the previous Frameworks? From your post, the reason would seem to be - so we can say that the download is smaller. Given that almost everyone building pre-Windows 7 images or reinstalling Windows will be running both installations for a few years at least, i don't think this counts for much at all, it just adds complexity to deployments.

What will happen when .Net 5 is released - will we then be installing .Net 3.5 SP1, .Net 4 SP? and .Net 5 ? Will you again be blogging on how small the .Net 5 installer is?

What's the alternative? Well how about this - define a Windows/Office style end-of-life or extended support point for all Frameworks. Include in a single installer, all Frameworks that have not reached this extended support point. Make this installer available on Windows Update, and in subsequent Windows RTM and SP releases. Anyone requiring a previous Framework can get it from microsoft.com Downloads.

Now all this is somewhat academic given that .Net 3.5 SP1 is included in Windows 7, but for those doing XP or Vista deployments, it's going to be another little annoyance to deal with.
April 27, 2010 6:30
Hi Drewfus.
Thanks for your feedback.
I don’t understand why you say “comprehensive .Net program support will now require two Framework installations, .Net 3.5 SP1 and .Net 4."

If you write a .NET4 Client app all you need is the smaller NET4. Why would you also need the 3.5 SP1?

I understand that right now, since NET4 does not have ubiquity, some developers may not target 4.0 .
But this is likely to change in the near future.
If a developer chain-install a framework with his app, why wouldn’t he want to carry a smaller, faster to install, w/ smaller deployment fail-rate framework for machines that do not already have 4.0? why would such developer need 3.5 sp1?

Client Profile will mostly help Client desktops developers who ship his app to the masses . Are you such a developer?

Jossef
April 29, 2010 8:00
Jossef,
i handle deployments, i'm not a professional programmer.

Commenter Pete understood my point of view. It is simply a request for a single installer containing all non-ancient Framework versions - where the definition of non-ancient is determined by your (Microsoft's) telemetry.

Sure , being able to chain a small installer is great for a single developer, but surely there are positives and negatives to having only the most current Framework in the most current installer, otherwise Microsoft would have done the same with .Net 3.5 and 3.0 and 2.0 and 1.1.

But what is problem anyway? Just have two installers - one for developers (.Net <current>), and another all-in-one for Windows Update and microsoft.com/downloads. Easy.
April 29, 2010 20:02
I agree with you Drewfus. Jossef you are thinking of it from a single application programmer perspective not a computer deployment one. Most people for the next few years will need .NET 3.5 and .NET 4 on their machines so they can run all their regularly used programs. Just like when .NET 1.1 and 2 were both being used concurrently in fact I still know of a program that has never been updated to .NET 2.0 never mind 4.
May 02, 2010 3:16
If i installed .Net 4 on a clean installation of Vista, i would then have versions 2, 3 and 4 installed, but not 3.5. .Net 3.5 would have to be installed, just to get this half-version.
May 06, 2010 20:13
This seems like a fragmentation of .Net more than anything else. Client vs full is SO minor compared to .Net 3.5 SP1 to .Net 4.

This ONE feature has probably already cost us small ISV's millions of dollars. We have all had to go back and retest to a second platform in essence for .Net 4 Client. System.Design, System.Web. Look at all the changes component vendors have had to go through. So for the want of a 7 MB smaller download Microsoft has pushed off MILLIONS of dollars in Engineering and Testing time onto ISVs.

Thanks, we really needed that extra burden in todays economy.

June 25, 2010 15:01
Installed the "Full" .net 4.0 framework on W2k8, after installing the Client Profile is 189 MB, Extended is 46,4 MB. So, where is that small size???
August 17, 2010 23:50
Does anyone know if the web bootstrap installer for the .NET4 Framework can upgrade a Client Profile install to a full (+extended components) install without going through the entire download and installation process?
September 11, 2010 3:23
after uninstal net framework 4 why my hardisk free space became low ?

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.