The framework is split. Some parts of .Net are included in the normal .Net Framework. But some features are only found in the Extended / Full .Net Framework.
I ran into this when testing an update to a WinForms application that I was working on. The app worked great in production, but once we moved it to the testing environment, this error popped up:
Could not load file or assembly ‘System.Runtime.Caching, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
That’s strange. I just added some caching to the app and used the System.Runtime.Caching assembly, but why can’t the test system find this assembly? I checked, and .Net 4.0 is installed, but the System.Runtime.Caching assembly is nowhere to be found. I tried reinstalling .Net, and then uninstalling/reinstalling .Net again, but the DLL never showed up. I checked a couple of other systems, and they were also missing the assembly.
After some digging, I discovered that System.Runtime.Caching.dll is part of the .Net Full Profile, or the Extended .Net Framework. The systems I was testing on only had the .Net Client Profile installed. The run-of-the-mill framework that is installed on most systems, and that is available via Windows Update, is the .Net Client profile.
The Client Profile includes those DLLs in the Framework that are most often used, whereas the Full Profile includes all DLLs that are part of the .Net Framework. The Full Profile is a separate installation from the Client Profile.
So I needed the Full Profile.
If you want to install the Full Profile for the Microsoft .Net Framework 4, you can download it from:
(or you can just install .Net 4.5 - see the section below about .Net 4.5)
After installing the Full Profile, you should see it listed as ‘Microsoft .Net Framework 4 Extended’ in Add/Remove Programs:
The Full Profile is installed as part of installing Visual Studio - so there is nothing extra to install on your development machine. When building WinForms or WPF applications, you can target either the Client Profile or the Full Profile. You can see your choice by opening the properties window for your project and selecting the Application tab:
Choose ‘.Net Framework 4’ to use the Full Profile, and choose ‘.Net Framework 4 Client Profile’ to use the Client Profile.
The Client Profile is a subset of the Full Profile and includes the most commonly used functionality needed by WinForms and WPF applications. The Client Profile is also part of Windows Update and is already installed on many windows computers. As such, start with the Client Profile.
If you find that you need some assemblies that are only available in the Full Profile, then you can retarget your application to the Full Profile and use it. Please note that this will require your users to install the Full Profile on their systems, as the Full Profile is typically only installed on servers running IIS / ASP.Net and not on desktop or laptop computers.
If you’ve moved on to .Net 4.5, the Client Profile has been discontinued. If you look at the screenshot above, you will notice that ‘.Net Framework 4.5 Client Profile’ is not available as a Target Framework in Visual Studio. The Full Profile is all that exists for .Net 4.5, and it is the version that is distributed with Windows Update. As such, this entire discussion is moot if you’re using the Microsoft .Net Framework 4.5.
One other interesting note is that if you install .Net 4.5, it replaces .Net 4. Because .Net 4.5 no longer distinguishes between the Full and the Client Profiles, an application that targets the .Net Framework 4 Full Profile will run on any system that has .Net 4.5 installed.
MSDN - .Net Framework Client Profile.aspx “MSDN - .Net Framework Client Profile”)
MSDN - Discontinuation of Client Profile
Jossef - What’s new in .Net Framework 4 Client Profile RTM
Scott Hanselman - Towards a Smaller .Net 4 - Details on the Client Profile and Downloading .Net