Now that Beta 2 is out I can talk more freely about what is happening with the .NET Framework. The most visible changes are the installation size, speed, and error rate of the Framework. There are also a lot of great new features
- Installation
- Architecture specific installers that are smaller sizes ranging from 76-86% decrease in installation size from 3.5 SP1.
- enabled more features on the Client Profile
- Language Features
- dynamic (c#),
- optional/default parameters (c#),
- named parameters (c#),
- no more line continuation character (VB),
- Runtime Features
- multi-core support,
- background garabage collection for desktops although not servers
- side by side runtime allows .NET 2.0/3.0/3.5 applications to run along side .NET 4 and even within the same process
- Limited supportr for code contracts
- Base Class types
- BigInteger to support integers larger than 64 bit
- Complex to support complex numbers
- Class Libraries
- Managed Extensibility Framework
- Workflow Framework v2 (new rewritten based on common XAML stack with WPF)
- Entity Framework v2
- Lots more
In this article, I am going to discuss some of the overall aspects, architecture, and installation of the .NET Framework.
.NET Profiles
In .NET 3.5 SP1, the .NET team began looking at how to break up the Framework. This was due in part to the installation size and the fact that Client application needs differ from server needs. A concept called a profile was created. A profile is a subset of .NET and used for specific application types. The result was the addition of two profiles
- Client Profile – this Profile is a subset of .NET Framework tailored for client applications. It should be used for .NET applications requiring WinForm, WPF, Console and basic non-server functionality.
- Server Core Profile – this Profile is a subset of the .NET framework for server applications. It can run server oriented applications like ASP.NET and WCF. In addition, Powershell is integration is supported. It is used to give a production server the minimal feature set to run ASP.NET, WCF and Powershell applications. It is intended to reduce the size of the framework and give a smaller attack surface which reduces servicing requirements. It is only available on Windows 7 Server Core installations.
The Full Framework is required for development. If the profile you targeted does not have everything you need, you would also use the Full Framework.
Visual Studio installs the Full Framework. That also means your debugging and unit tests if run on the same machine are actually testing against the Full Framework. Make sure you test on your target profile.
In .NET Framework 4, the team further refined our approach. First, there is not yet a Server Core Profile. The team is looking at what will go into the next version of Windows as always. With the Client Profile, the team made substantial differences to make the Client Profile more than just a stub of .NET that still needed to be upgraded to the Full Framework. The new Client Profile can be installed, upgraded and serviced independently of the Full Framework. You can go from Client Profile 4 to Client Profile 4.x or even upgrade to the Full .NET stack.
To address complaints about the size of the installer the Framework now ships with architecture specific installers. In addition, better compression and how the Framework is installed has led to smaller installation sizes.
Installation Sizes
Installation Option |
Initial Size |
Addl. Download |
Notes |
.NET 3.5 SP1 |
Installs on all OSs and architectures | ||
Redist Package |
231.5 MB |
N/A |
|
Web Installer |
2.8 MB |
10 MB – 60 MB |
Depends on what is already installed |
.NET 4 Beta 2 (Full) |
All OSs but architecture dependent | ||
x86 Redist Package |
37.7 MB |
N/A |
Only x86 |
x64 Redist Package |
54.5 MB |
N/A |
Installs on x86 and x64 (recommend) |
Ia64 Redist Package |
56.4 MB |
N/A |
Only ia64 |
Web Installer |
850 KB |
25 MB – 56 MB |
All architectures and download varies by architecture and what is already installed |
.NET 4 Beta 2 Client Profile |
All OSs but architecture dependent | ||
x86 Redist Package |
30.9 MB |
N/A |
Only x86 |
x64 Redist Package |
47.1 MB |
N/A |
Installs on x86 and x64 (recommend) |
Web Installer |
850 KB |
25 MB – 54 MB |
All architectures and download varies by architecture and what is already installed |
What makes up the install?
The .NET Frameworks are made up of several parts. At the bottom are components that are shared by all the Frameworks for example MSCoree.dll. Most of these are binaries that act as shims that direct to the right CLR/Framework based on the calling application. These shims call version specific implementations like the CLR. And finally the .NET Framework library runs on top like the .NET Framework 2.0, 3.0, 3.5, or 4.
As you can see from the above diagram the 2.0, 3.0 and 3.5 versions of the Framework are built and depend upon the older versions. The Framework 4 is a single unified Framework built upon a new version of the CLR and lives side by side with the CLR v2 based Frameworks.
The installation is composed of Shared Components, CLR and the Framework. With the Framework being broken into Client, Server Core and Full the deployment team looked at best how to ensure a unified experience. Server Core will be a future OS only feature so I will ignore it. This left Client Profile and the Full Framework.
Since the Client Profile is a subset of the Full Framework you could say the Full Framework is composed of the Client Profile and the remaining portion of the Framework. This is exactly what the team did. There are the Shared Components which are an OS update. Then there is a Client MSI and the remainder called Extended MSI. After installing the Full Framework on a computer opening up Programs and Features will have two new entries. In addition, once the localization of the Framework you could have a language pack per language.
To uninstall the Framework you must uninstall the language packs and then Extended, Client and finally the OS Update containing the Shared Components (KB958488).
Unlike the older Frameworks the new installers are single unified packages. DO NOT break them up. The deployment team wrote a robust chainer that includes the ability to heal and retry if an error is encountered. In addition, the 7zip compression is being used to further compress the package as small as possible. These changes in the installer have led to a higher install success rate.
Comments