WPF performance and .NET Framework Client Profile related blogs provided by Jossef Goldberg.
Hopefully folks have seen Soma’s and Jason Zander’s blogs announcing the availability of Beta 1 of Visual Studio 2010 and .NET Framework 4. In .NET Framework 4 we introduced a streamlined subset and more compact version of the .NET Framework called the Microsoft .NET Framework 4 Client Profile. The goal of the Client Profile is to improve the deployment size, time, reliability and overall deployment experience for client application users.
The Client Profile contains the functionality that most common desktop client applications (including Windows Forms and WPF applications) would need, so we expect that many client application developers will use it. This will improve the overall application deployment experience when the application requires .NET Framework 4 to be installed.
One of the most important improvement is that Microsoft .NET Framework 4 Client Profile is now supporting all platforms and OS's that are supported by the full Framework including Vista, XP, Win2k3, Win2k8, Windows7, x86/x64 (excluding IA64)
We still expect some applications to target the full .NET Framework 4 if they need to use features that are not included in the .NET Framework 4 Client Profile.
Visual Studio 2008 introduced multitargeting for application projects to target 2.0 and 3.x versions of the .NET Framework. Visual Studio 2010 has improved multi-targeting in order to allow developers to easily target the new .NET Framework 4 Client Profile.
In Beta 1, when you create a new Windows Forms or WPF application, it targets the full framework by default. To change to targeting to the Client Profile, open the project properties, select the "Application" page, and change the “Target Framework” drop-down to “.NET Framework 4.0 Client Profile.”
C# project example:
VB project example (Project Properties > Compile tab > “Advanced Compile Options…”):
Notice that if you right-click the project and select “Add References…”, the dialog will show only the .NET Framework assemblies that are part of the Client Profile. This is accomplished by using reference assemblies, metadata-only versions of assemblies. The .NET Framework 4 Client Profile Reference Assemblies are located in
At compile time, the reference assemblies are matched up against the known "Client List" assemblies that are included in the Client Profile. If the project has a reference to a .NET assembly that is not included in the "Client List", Visual Studio will display compile-time errors in the Error List.
Similar to the .NET 3.5 Framework SP1 Client Profile, the project adds a configuration file (app.config) that will specifically declare the application as a "client" application. This declaration indicates to the CLR loader that you are trying to run a Client Profile application. Without the configuration file, the CLR loader thinks that you are trying to run full .NET 4, and if the machine only has the Client Profile installed, it prompts ebd-user to install the full .NET 4. [Note: this functionality is not available in Beta1.]
Although the concept of a Client Profile is not new and was introduced in .NET Framework 3.5 SP1, the 4.0 Client Profile contains important improvements:
.NET Framework 4 Client Profile
.NET Framework 3.5 SP1 Client Profile
Supported on all platforms and OS's that are supported by the .NET Framework (excluding IA64 and Server Core role in W2K8)
Supported only on Windows XP 32-bit machines that did not have any .NET Framework version installed.
(Client Profile will install the full 3.5 SP1 Framework under the covers otherwise)
Supports redistributable as well as web download
Supports Web download only
Add Remove Programs entries
The full Framework comprises the Client Profile and another part called “Extended” thus it has two entries in the Add Remove Programs dialog (or Programs and Features window).
To remove (or repair) the full Framework you must remove the Extended part first, then the Client part.
If you installed the full Framework, you can go to the Client Profile by removing “Extended” from Add/Remove Programs.
Single entry in Add Remove Programs
Improved support for Client Profile targeting in Visual Studio 2010
Includes new .NET 4 features (such as Managed Extensibility Framework (MEF), C# 4 Dynamic Keyword, etc)
Common Language Runtime
Can be installed side-by-side with older versions of the Framework
In-process side by side support
Improved COM interop
Innovations in the Visual Basic and C# languages
implicit line continuations
Base Class Library Improvements
Managed Extensibility Framework
Additional core data structures
Parallel Computing Innovations
Task Parallel Library (TPL)
Parallel LINQ (PLINQ)
REST-based exposure of relational data
Entity Framework, LINQ to Entities
SqlClient, OLEDB, ODBC Managed Providers
XML, LINQ to XML
LINQ to SQL
Runtime design libraries for Entity Framework and ADO.NET Data Services
ASP.NET AJAX Improvements
More extensibility during XamlReader.Load and XamlWriter.Save
Ability to use generics
Better References by Name
Windows Communications Foundation
WCF Client Component
WCF Workflow Services
Windows Presentation Foundation
New line-of-business controls including charting control, smart edit, data grid, and others that improve the experience for developers who build data centric applications
Support in for Windows 7 multi-touch, ribbon controls, and taskbar extensibility features
Added support in WPF for Surface 2.0 SDK
Windows Workflow Foundation
Improved activity programming model
Improved designer experience
New flowchart modeling style
Expanded activity palette
New message correlation features
Significant performance gains for WF-based workflows
Various perf counters
Visual Basic compiler and other compilers
• Full Support
○ Partial Support
Please download the Client Profile from the download site here and provide us with feedback. We really would love to know:
PingBack from http://microsoft-sharepoint.simplynetdev.com/net-framework-4-client-profile-introduction/
Thank you for submitting this cool story - Trackback from DotNetShoutout
Cool feature - it seems this would be even more useful on mobile devices. Any plans for this feature to make it into the .Net Compact Framework?
As I had mentioned in my previous posts, .NET Framework 4 brings the concept of .NET Framework 4 Client
I am late to this  but still wanted to share an “insider view” into the status of “WPF 4” in the
Thank you for submitting this cool story - Trackback from progg.ru
"To remove (or repair) the full Framework you must remove the Extended part first, then the Client part."
This seems... suboptimal. In fact, why is the framework here at all? Why is it not under updates? Or system components?
That seems like a terrible idea to me, why add a pointless step?
"If you installed the full Framework, you can go to the Client Profile by removing “Extended” from Add/Remove Programs. "
Why would going back the client profile (for testing?) be worth the effort? Can't you just uninstall and reinstall the whole thing if you need to?
About the size thing, last time I checked the 2.0 redist was smaller than the client profile and since I don't use WPF I'm inclined to recommend / require that, which is on more machines already anyway.
"# Setup may require a reboot, depending on the OS and currently running programs during installation. "
XP is the only OS supported though?
I think the client profile is well intentioned, but overly complex for minimal benefit. That's not to say that it can't be made better. The main things are for a *really* small download size. I'd be great if you could just generate a manifest or something from a solution or set of assemblies that could instruct the installer exactly which parts of the framework to get "now".
Bar that, using a good solid compression algorithm (ie. anything other than CAB or ZIP :P) could significantly reduce the size of the final download. UPX works wonders, if only it worked with managed code.
All the best, rambling thoughts,
can i have system.speech.synthesis TTS feature in client profile please ?
How do I know whether it is being compiled under .net 4 client profile or full version.
//.. do something
One approach you can take is add this at the bottom of your project file:
<DefineConstants Condition=" '$(TargetFrameworkVersion)' == 'v4.0' ">$(DefineConstants);NET_4_0</DefineConstants>
<DefineConstants Condition=" '$(TargetFrameworkProfile)' == 'Client' ">$(DefineConstants);CLIENT_PROFILE</DefineConstants>
This will define the symbols you used in your example when they apply.
// remove the stray "TargetFrameworkProfile" I added in the second-to-last line of my example.
i develop wpf 4.0 app in VS 2010, how can i use Client Profile Configuration Designer. Where does it locate? I can't find it. Is there way to use "Client Profile Configuration Designer from .NET 3.5 SP1"? Is there workaround for .NET framework 4.0 Client Profile? Thanks.