Introduction to Client Profile Preview


In this article, we will discuss about Client Profile Preview. This has been introduced for .NET 3.5 Framework with SP1. The main purpose of this is to provide a smaller .NET framework in size for users running their client applications. The Client Profile Preview is a subset collection of assemblies present in .NET 3.5 SP1. This framework contains only required components for running the windows applications like Win Forms or WPF. The elements present in this thin framework are:

  1. Smaller Framework in size (around 28MB).
  2. Smaller and Faster client deployment boot strapper.
  3. Client applications targeting:
    • Win Forms
    • WPF
    • WCF
    • CLR
    • ClickOnce.

This framework is also called as .NET Framework 3.5 SP1 Client Profile Preview, since it is having subset features of .NET 3.5 SP1 framework. We can create applications targeting this client framework in VS 2008 SP1. There are two core components of this thin client framework.

  1. Redistributable packages
  2. Deployment Boot Strapper.

A redistributable package is a set of assemblies present in client framework. The deployment and installation of client framework is same as complete .NET Framework Client framework architecture and design is same as complete framework. This will help the user to upgrade his client framework to fully functional framework on demand easily.

Deployment Boot Strapper manages the deployment of client redistributable packages. This boot strapper is smaller in size and handles web based deployment scenarios. This boot strapper is xml driven for determining deployment scenarios. Important xml files of boot strapper are:

  1. Deployment.xml: It contains the definition of the user interfaces displayed to clients when it is deployed.
  2. Product.xml: It contains the information needed for the installation of products, used by the application.

This client framework can be installed on client machines; where there are no .NET framework components present. Windows Vista, Windows 7 and Windows Server 2008 are having built-in .NET framework in it. So, client framework installation is not required on those. This thin client framework is mainly targeting Windows XP and other versions, which are not having .NET framework components by default.

VS 2008 SP1 allows us to design client applications targeting this client framework. We can make any Win Forms or WPF applications to run on this Client Profile Preview by Enabling "Client-only Framework subset" in its project properties as shown below:



When we enable this option, compiler will check all the assembly references against the assemblies present in client framework and issues a compilation warning, if your application is referencing an assembly; which is not part of the framework. If this compilation warning is not handled by the developer, it may result improper working or crashing of application on client machine. After enabling this option, it will add below entry to app.config:

<startup>
 <
supportedRuntime version="v2.0.50727" sku="Client"/>
</startup>

We need to distribute this configuration file along with client application EXE. The above entry will inform to .NET Framework CLR that this application is Client application. While running the client application, if above entry is missing than it will assume that the application requires full .NET framework is needed and prompts the same to the client. If client machine is having full .NET Framework, than above declaration will be ignored and runs on it.

Client Profile Preview allows us to customize the deployment process. We can customize the UI like size, colors etc of installation windows, prerequisites needed and deployment types. All customizations are driven by xml files. We can do UI customizations uing Deployment.xml . In the same way, we can do prerequisites customization using Product.xml. We will discuss about UI and prerequisites customization in deep in coming articles.

We can also customize the deployment procedure. We can deploy the application over web or media based like offline deployment using packaging tools. We can deploy our application over web by specifying "HomeSite" in Product.xml. While installing, Client Profile Preview boot strapper will go to "HomeSite" and download items needed for the deployment.

So, by using this thin client framework we can make our client applications work without the need of full .NET Framework. At the same time, we can customize the deployment of our application also.

I am ending the things here. In coming articles, we will go deep into this Client Profile Preview. I hope this article will be helpful for all.

Up Next
    Ebook Download
    View all
    Learn
    View all