现在的位置: 首页 > 综合 > 正文

.Net Framework 4.0 和.Net Framework 4.0 Client Profile 的区别

2013年10月12日 ⁄ 综合 ⁄ 共 4765字 ⁄ 字号 评论关闭

转载于:http://www.cnblogs.com/smallsoftfox/archive/2012/06/21/2558244.html

 

Net Framework 4.0 和.Net Framework 4.0 Client Profile

Net Framework 4.0 和.Net Framework 4.0 Client Profile区别:

.Net Framework 4.0毫无疑问就像是.Net Framework 2.0一样是.Net Framework 的 4.0版本;

而.Net Framework 4.0 Client Profile是.Net Framework 3.5 sp1的子集,是.Net Framework 4.0 简化版,

是面向客户端应用程序的(估计这也是为什么不能够使用IIS7 API的原因)。

什么要引入这个简化版本呢?

1. 减少.NET Framework以及包还.NET Framework的应用程序的部署时间;
2. 减少.NET Framework部署的失败;
3. 减少.NET Framework在ISV软件的所占大小,从而给其软件更多的空间;
4. 减少安装了.NET Framework Client Profile的系统受攻击的“界面”,因为Client Profille中部包括ASP.NET和一些服务器所要的组件;

When to use NET4 Client Profile and when to use NET4 Full Framework?

Client Profile:
We recommend that the NET4 Client Profile be utilized as the primary framework for most client desktop applications (including Windows Forms and WPF apps).

Since we are considering to make the NET4 Client Profile available broadly to desktops via Windows Update, most client desktops may have NET4 Client Profile soon after NET4 releases making it ubiquitous*.

Until that time, NET4 apps can chain-install the NET4 Client Profile which is smaller and faster to install.

*Note: This plan is not final.

Full framework:
The Full framework is a superset of the Client Profile. It should mainly be used for:

Server apps (e.g. ASP.Net apps) For developer scenarios (for example, this includes msbuild) For all other legacy client scenarios (for example, this includes System.Data.OracleClient.dll which is being deprecated in NET4) that are not included in the Client
Profile.

 

 

转载于:http://www.cnblogs.com/yellowapplemylove/archive/2011/05/09/2040830.html

 

Visual Studio 2010如期发布了,我怀着迫不及待的心情马上下载了最新的ISO来安装和感受一下。

.NET Framework 自从 2002 年发展至今,已经历了好几个版本,1.0, 1.1, 2.0, 3.0, 3.5 等不同的版本更替,.NET Framework 的Redistributable Package也愈来愈大,到了 .NET Framework 3.5 SP1 时已经膨胀到 231MB,除非软件本身就很大,不然对于 .NET 软件的Redistribute是相当不利的,除非客户端本身就有安装 .NET Framework,否则几乎都要夹带一个 .NET Framework 的Redistributable
Package,如果只是一个小小的应用程序文件 (几十或几百KB) 还要夹一个那 大的 .NET Framework Redistributable Package,大概很多开发人员都会觉得麻烦,就算开发人员接受,但在企业网络的 IT 管理人员就不一定会接受了 … 所以 .NET Framework 的减肥一直都是 .NET 开发人员的愿望与期待,而 .NET Framework Client Profile 就是微软针对这个需要的主要响应。既然 .NET 应用程序不一定会用到所有的 .NET Class
Library,那微软就将 .NET Framework 部份不常用的功能由主函数库中抽离出来,让Redistributable Package可以缩小,有利于重新发布应用程序。
.NET Framework Client Profile 在 .NET 3.5 时首次和开发人员见面,但是碍于它只能利用 ClickOnce 部署方式安装,因此使用它的开发人员不多,且也有许多人反应希望将 .NET Framework Client Profile 能够利用光盘或其他储存媒体转散布,微软从善如流,将 .NET Framework 4.0 的 Client Profile 改成Redistributable Package。

The .NET Framework 4 Client Profile 包含下列功能:

•Common Language Runtime (CLR)
•ClickOnce
•Windows Forms
•Windows Presentation Foundation (WPF)
•Windows Communication Foundation (WCF)
•Entity Framework
•Windows Workflow Foundation
•语音
•XSLT 支援
•LINQ to SQL
•Entity Framework 与 WCF Data Services 执行期设计函式库
•Managed Extensibility Framework (MEF)
•动态型别
•并列程序设计功能,例如 Task Parallel Library (TPL), Parallel LINQ (PLINQ), and Coordination Data Structures (CDS)

•除错客户端应用程序
下列功能不包含,要另外安装 .NET Framework 4.0 的完整版本:

•ASP.NET
•进阶 Windows Communication Foundation (WCF) 功能
•.NET Framework Data Provider for Oracle
•编译用 MSBuild
•Visual Studio 2010 的项目中,

 

下列应用程序会默认使用 .NET Framework 4.0 Client Profile,若要使用完整的 .NET Framework 功能,则要自行到项目属性中设定 target framework 至 .NET Framework 4.0:

•Windows Projects (C# and Visual Basic)
•Windows Presentation Foundation
•WPF Application
•WPF Browser Application
•WPF Custom Control Library
•WPF User Control Library
•Windows Forms
•Windows Forms Application
•Windows Forms Control Library
•Console Application
•Empty Project
•Window Service
•Visual F#
•F# Application
•F# Tutorial
•Workflow (C# and Visual Basic)
•Activity Designer Library
•Activity Library
•Workflow Console Application
•Windows Communication Foundation
•WCF Service Library
•Office 2007 and Office 2010
•All projects target the .NET Framework 4 Client Profile

而 .NET Framework 4.0 Client Profile 与原有的 .NET Framework 3.5 Client Profile 不同的地方有:

•3.5 版本的 Client Profile 只能使用在 Web (ClickOnce),4.0 版本则因为具有Redistributable Package,所以可同时适用于本机或 Web 安装。

•3.5 版本只支持 x86 的 Windows XP SP2/SP3,4.0 版本则支持除了 IA64 以外,.NET Framework 4 支持的所有平台。

•3.5 版本的 Client Profile 与 .NET Framework 3.5 是分开的版本,4.0 版则为 .NET Framework 4.0 完整功能的子集。

•3.5 版本会受 Windows Update 的影响自动升级到 .NET Framework 3.5,4.0 版则可以在不需要完整 .NET Framework 4.0 下自行运作,也可以分开提供服务。

不过也因为如此,当在 Visual Studio 2010 建立新项目时,如果发现 [添加引用] 中没有列出原本应该列出的组件时,可以先检查是否是项目的 target framework 设成了 .NET 4.0 Client Profile (例如 System.Web.dll 就不在 .NET 4.0 Client Profile 套件中)。

 

转载于:http://kb.cnblogs.com/page/74333/

 

.NET Framework Client Profile是.NET Framework的裁剪版本。它面向客户端应用程序。它提供 Windows Presentation Foundation (WPF)、Windows 窗体、Windows Communication Foundation (WCF)和 ClickOnce 功能的简化子集。这可以为面向.NET Framework Client Profile 的 WPF、Windows 窗体、WCF
和控制台应用程序实现快速部署方案。

参看:http://msdn.microsoft.com/zh-cn/library/cc656912.aspx

在VS2010 中,你默认建立的 WPF 程序就是.Net Framework 4 Client Profile ,而不是.Net Framework 4。昨天下午到今天早上,我在为 System.Web 无法引用而苦恼的问题,就是它导致的。

VS2010中,我们在项目的属性下,可以看到项目有以下多种 Target framework 属性。

我今天碰到的 Sytem.Web 引用问题如下:

在用 VS2010 Beta2 书写一个WPF应用的时候,要使用 System.Web.HttpUtility.UrlEncode()方法时,发现竟然无法增加对 System.Web 的引用。如下图:

.NET Reference 中没有 System.Web 组件。

使用 Browse 方式打开指定目录的文件 C:\Windows\Microsoft.NET\Framework\v4.0.21006\System.Web.dll 也不行。

如下图:

GAC 中也没有 4.0 版本的 System.Web 组件,如下图:

强制添加 C:\Windows\Microsoft.NET\Framework\v4.0.21006\System.Web.dll 到GAC 时会报错误:

抱歉!评论已关闭.