Towards a Smaller .NET 4 - Details on the Client Profile and Downloading .NET
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.
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.
About Newsletter
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.
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.
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
e.g. http://msdn.microsoft.com/de-de/library/dd831853.aspx
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.
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.
If i have an app designed for, say, .Net 2.0, will i still have to install .Net 2.0 or .Net 3.5sp1?
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,
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.
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.
.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.
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?
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.
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
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....
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.
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.
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.
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?
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.
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
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.
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.
Comments are closed.