`
cdragon
  • 浏览: 76661 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

client profile introduction(客户端概要介绍)

阅读更多

Introducing .NET Framework 3.5 SP1 Client Profile Preview

The .NET Framework Client Profile Preview (Client Profile Preview) was created to answer the feedback from many customers that a smaller framework was needed specifically for Client Applications. The Client Profile Preview Preview is a subset of assemblies already contained within .NET Framework 3.5 Service Pack 1. The Client Profile Preview subset is focused on fulfilling the needs of Client applications.

The Client Profile Preview contains the following features:

  • Smaller framework deployment - ~28 MB client deployment package
  • Smaller, faster client deployment boot strapper
  • Client Application focused feature set:
    • Common Language Runtime (CLR)
    • ClickOnce
    • Windows Forms
    • Windows Presentation Foundation
    • Windows Communication Foundation
  • Visual Studio 2008 SP1 Integration – Applications can be targeted specifically for the Client Framework subset.

.NET Framework Client Profile Preview

The Client Profile Preview is made up of a combination of features. The first part is client redistributable packages that are installed by end-users. The second part is the client deployment boot strapper that manages the deployment of redistributable packages.

Client Profile Preview Redistributable Packages

There are no new features specific to the Client Profile Preview. The subset of assemblies is the same as in the full installation of the .NET Framework. The Client Profile Preview is deployed and installed in much the same way that the full .NET Framework is deployed and installed.

Client Profile Preview
Figure 1. Client Framework

As you can see in Figure 1, the .NET Framework is a set of versioned layers that are dependent on the layer below it. The Client Profile Preview is broken down in the same way to ensure that the functional parity would be maintained in the client framework.

The Client Profile Preview is deployed in the same versioned layer system as the full framework. This allows for the end-user computer to be easily upgraded to the full framework if an application requires the full framework.

Client Profile Preview Deployment Boot Strapper

The Client Deployment boot strapper is the part of the Client Profile Preview that manages the deployment of the client redistributable packages. The Client Profile boot strapper is small, approximately 200 KB in size, and is primarily designed to accommodate web based deployment scenarios. The Client Profile Preview boot strapper is also XML file driven to allow for more flexibility of deployment configurations.

Client Profile Preview
Figure 2. Client Profile Preview Bootstrapper

As seen in Figure 2, the Client Profile Preview boot strapper contains several XML files that determine how packages are deployed.

The Deployment.xml file contains the definition of the user interfaces displayed to end-users when it is deployed. The file also contains references to Product.xml files that allow developers to define how an application or prerequisite is to be installed and/or uninstalled.

The Product.xml file(s) contains the information needed to install the products required by an application. The Product.xml file format follows the Product and Package Schema Reference required for ClickOnce application deployments.

.NET Framework Client Profile Preview Deployment Scenarios

The .NET Framework Client Profile Preview is targeted for end-user configuration where no framework components are installed. Microsoft Windows Vista and Microsoft Windows Server 2008 already have parts of the .NET Framework installed, so client redistributable deployments on these platforms will not be possible.

Microsoft Windows XP SP2 or greater and Windows Server 2003 do not have any framework components installed by default. The Client Profile Preview redistributable package can be installed on Windows XP. The Client Profile Preview redistributable package will not be installed on Windows Server 2003 as this platform is not intended for use as a client application platform. The following table explains how each platform will be managed to ensure Client Applications are fully functional upon deployment.

Deployment Scenarios

As is illustrated in the preceding table, the Client Profile Preview deployment is focused on Windows XP SP2+ with No Framework components installed. This .NET Framework platform configuration is still the predominant .NET Framework platform configuration and will continue be so for the foreseeable future.

However, it should be noted that the end-user deployment experience for all platform configurations will continue have the same look, feel and consistency.

Visual Studio 2008 SP1 Integration

Developing application for the Client Profile Preview is supported across all Visual Studio 2008 SP1 editions. Developers will need to specifically choose to target their applications for the Client Profile Preview.

Opting In Your Project

Almost any Visual Studio project that is a Client Application can be configured to function on the Client Profile Preview.

Configuring Your Project

Any WinForms or Windows Presentation Foundation project can be configured for the Client Profile Preview. Developer will need to update their Project Properties to specifically target the Client Profile Preview.

Configuring your project
Figure 3. Client-only Framework subset

As seen in Figure 3, developers will need to open the Advanced Compiler Settings in the Project Properties and check the "Client-only Framework subset" option.

Compiling Your Project

Checking this option will update the project in two ways. First, the compiler will check the project’s assembly references against a list of Client Framework Assemblies to see if there are any conflicts. If your project references assemblies that are not in the Client Framework Assemblies list, it will show up as a compilation warning.

Developers will need to be aware of this compilation warning and make the appropriate changes to their project in order to function properly on the Client Profile Preview. If this is not done, applications may see random MethodNotFoundException error messages or their applications may not function properly at all.

NOTE: In some cases, it may be appropriate to ignore this warning if the developer is taking care to make sure the assembly referenced in the project will be available at runtime.

Client Profile Preview Runtime Checks

The second way your project will be updated upon checking the "Client-only Framework subset" is that an Application Configuration file will be added to your project. Adding this app.config file will declare to the .NET Framework Common Language Runtime that this application is Client Application.

Runtime Checks
Figure 4. Client Application declaration.

As seen in Figure 4, the "sku=Client" attribute is added to the application configuration file. The application configuration file will also need to be distributed with application EXE file. At runtime, the framework runtime will check the contents of the file, if this declaration is not found, the runtime will assume that this application requires the full .NET Framework and prompt the end-user to install the full .NET Framework.

If the full .NET Framework is present on the computer, this declaration will be ignored and the application will start as normal.

Deploying Your Project From Visual Studio 2008 SP1

In Visual Studio 2008, developers have the option of deploying their projects directly from Visual Studio. Developers will continue to have this option for Client Profile Preview based deployments as well.

Visual Studio Project Publishing

When a developer chooses to deploy their project from Visual Studio, they can choose the built-in Publish functionality in their project. The Publish functionality, if all the defaults are chosen, will target and set as a prerequisite, the full .NET Framework 3.5. This means that if the framework is not found on an end-users computer that has chosen to install this application, the .NET Framework 3.5 will be installed before their application is installed and allow to run.

Runtime Checks
Figure 5. Client Profile Preview Prerequisite

As seen in Figure 5, developers will now be able to change that prerequisite to target the ".NET Framework 3.5 Client Service Pack 1." This means that at runtime, the Client Profile will be installed if no Framework components are installed on the computer.

Visual Studio Setup Projects

For more complex project/application publishing, Visual Studio developers have also had the option of using a Setup Project to deploy their application. Visual Studio Setup Projects, just like the publishing functionality in Visual Studio, will always default to install the full .NET Framework 3.5.

In the same way that Visual Studio Publishing can be changed to target the Client Profile Preview, Setup Projects can be changed to target the Client Profile Preview. The options are the same as illustrated in Figure 5, developers will now be able to change that prerequisite to target the ".NET Framework 3.5 Client Service Pack 1." This means that at runtime, the Client Profile will be installed if no Framework components are installed on the computer.

Customizing The Deployment Experience

As mentioned in previous sections of this document, developers will have the flexibility to customize the deployment of their applications using the Client Profile Preview. The customizations allowed using the Client Profile Preview are:

  • Customization of the user interface
    • Customize the size, position, framing, background colors, fonts, etc. of the installation window
    • Choose to display the license agreements required by the products being installed
    • Choose whether or not to acknowledge the end of the installation process or immediately launch an application
  • Choosing the products to deploy with your application
    • Choose what prerequisites are required by the application and install them
  • Choosing how to deploy your application
    • Application deployment can be done over the web or from Media for an “offline” deployment experience

Customizing The User Interface

The user interface of the Client Profile Preview is driven by the Deployment.xml file. The Deployment.xml is a representation of the stages that the deployment process will run through. The stages of the deployment process are:

<PreInstallWindow /> - Start up of the deployment process where license agreements are displayed

<InstallWindow /> - Stage where the installation of the products is started. Display the progress of the installation.

<PostInstallWindow /> - Stage where the installation of the products is concluded. Developers can provide the option of starting the application that was installed.

Each of these stages have properties and controls that can be modified to fit the desired look and feel of the deployment process. For example, if a developer decided that the user experience should be such that they don’t want the user to acknowledge the conclusion of the installation and just go directly into application that was installed, the <PostInstallWindow /> stage can be omitted and the AppToLaunch property can be set.

Choosing The Products To Deploy With Your Application

The products being installed as part of the deployment of your application can also be customized. The Deployment.xml file also contains a <ProductRefs /> reference that will allow developers to define what products are to be installed. The <ProductRefs /> node can contain any number of references to Product.xml files that will define what gets installed.

When defining what will be installed by the application deployment, there will be at least two Product references, one for the Client Profile Preview installation and one for the application being installed. If the application being installed requires Microsoft SQL CE, then another Product reference must be added.

Choosing How To Deploy Your Application

Developers can also choose how they would like to deploy their applications. The most optimal method of deploying an application would be over the web. However, a developer can also choose to create a Media based deployment for DVD or USB Key Drives. The difference between the two is that the media based deployment must be completely self-contained and include all the prerequisites that may be needed on the media as well.

If a developer chooses to deploy their application over the web, developers can customize the "HomeSite" the Product.xml files to point a web download location of their choosing. At deployment time, the Client Profile Preview boot strapper will go to the "HomeSite" defined in the Product.xml file and download only the items that are needed for the installation, further optimizing the deployment experience for the user.

Conclusion

Developers will now be able to reach more client desktops than ever before without having to install the .NET Framework in its entirety. Application developers can be more targeted in where they deploy their applications. At the same time, developers can also create a complete end-to-end user experience that matches their product and brand.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics