Microsoft .NET 4.0 完整框架和客户端配置文件之间的差异

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2759228/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 14:14:24  来源:igfitidea点击:

Differences between Microsoft .NET 4.0 full Framework and Client Profile

.net.net-4.0.net-client-profile

提问by Click Ok

The Microsoft .NET Framework 4.0 full installer (32- and 64-bit) is 48.1 MB and the Client Profile installer is 41.0 MB. The extracted installation files are 237 MB and 194 MB respectively, and once installed, they are 537 MB and 427 MB.

Microsoft .NET Framework 4.0 完整安装程序(32 位和 64 位)为 48.1 MB,客户端配置文件安装程序为 41.0 MB。解压出来的安装文件分别为237MB和194MB,安装后分别为537MB和427MB。

This is a difference of 110 MB. What difference is there between the two packages?

这是 110 MB 的差异。这两个包有什么区别?

When is it preferable to install the Client Profile instead of the full .NET Framework?

什么时候最好安装客户端配置文件而不是完整的 .NET Framework?

回答by Cameron MacFarland

What's new in .NET Framework 4 Client Profile RTMexplains many of the differences:

.NET Framework 4 Client Profile RTM 中的新增功能解释了许多差异:

When to use NET4 Client Profile and when to use NET4 Full Framework?
NET4 Client Profile:
Always target NET4 Client Profile for all your client desktop applications (including Windows Forms and WPF apps).

NET4 Full framework:
Target NET4 Full only if the features or assemblies that your app need are not included in the Client Profile. This includes:

  • If you are building Server apps. Such as:
    o ASP.Net apps
    o Server-side ASMX based web services
  • If you use legacy client scenarios. Such as:
    o Use System.Data.OracleClient.dll which is deprecated in NET4 and not included in the Client Profile.
    o Use legacy Windows Workflow Foundation 3.0 or 3.5 (WF3.0 , WF3.5)
  • If you targeting developer scenarios and need tool such as MSBuild or need access to design assemblies such as System.Design.dll

何时使用 NET4 Client Profile,何时使用 NET4 Full Framework?
NET4 客户端配置文件:
始终针对所有客户端桌面应用程序(包括 Windows 窗体和 WPF 应用程序)使用 NET4 客户端配置文件。

NET4 完整框架:
仅当您的应用程序所需的功能或程序集未包含在客户端配置文件中时,才以 NET4 完整版为目标。这包括:

  • 如果您正在构建服务器应用程序。例如:
    o ASP.Net 应用
    o 基于服务器端 ASMX 的 Web 服务
  • 如果您使用旧客户端方案。例如:
    o 使用 System.Data.OracleClient.dll,它在 NET4 中已弃用且未包含在客户端配置文件中。
    o 使用旧版 Windows Workflow Foundation 3.0 或 3.5(WF3.0、WF3.5)
  • 如果您面向开发人员场景并需要 MSBuild 等工具或需要访问 System.Design.dll 等设计程序集

However, as stated on MSDN, this is not relevant for >=4.5:

但是,如 MSDN 所述,这与 >=4.5 无关:

Starting with the .NET Framework 4.5, the Client Profile has been discontinued and only the full redistributable package is available. Optimizations provided by the .NET Framework 4.5, such as smaller download size and faster deployment, have eliminated the need for a separate deployment package. The single redistributable streamlines the installation process and simplifies your app's deployment options.

从 .NET Framework 4.5 开始,Client Profile 已停止使用,只有完整的可再发行组件包可用。.NET Framework 4.5 提供的优化(例如更小的下载大小和更快的部署)消除了对单独部署包的需要。单一的可再发行组件简化了安装过程并简化了应用程序的部署选项。

回答by Oleg

You should deploy "Client Profile" instead of "Full Framework" inside a corporation mostly in one case only: you want explicitly denysome .NET features are running on the client computers. The only real case is denying of ASP.NET on the client machinesof the corporation, for example, because of security reasons or the existing corporate policy.

您应该在公司内部部署“客户端配置文件”而不是“完整框架”,主要仅在一种情况下:您希望明确拒绝某些 .NET 功能在客户端计算机上运行。唯一真实的情况是拒绝在公司的客户端计算机上使用 ASP.NET,例如,出于安全原因或现有的公司策略。

Saving of less than 8 MB on client computer can not be a serious reason of "Client Profile" deployment in a corporation. The risk of the necessity of the deployment of the "Full Framework" later in the corporation is higher than costs of 8 MB per client.

在客户端计算机上保存少于 8 MB 的空间不能成为公司部署“客户端配置文件”的重要原因。在公司后期部署“完整框架”的必要性风险高于每个客户端 8 MB 的成本。

回答by Richard Szalay

A list of assemblies is available at Assemblies in the .NET Framework Client Profileon MSDN (the list is too long to include here).

在 MSDN 上的 .NET Framework Client Profile 中的 Assemblies 中提供了一个程序集列表(列表太长,无法包含在此处)。

If you're more interested in features, .NET Framework Client Profileon MSDN lists the following as being included:

如果您对功能更感兴趣,MSDN 上的.NET Framework Client Profile列出了以下内容:

  • common language runtime (CLR)
  • ClickOnce
  • Windows Forms
  • Windows Presentation Foundation (WPF)
  • Windows Communication Foundation (WCF)
  • Entity Framework
  • Windows Workflow Foundation
  • Speech
  • XSLT support
  • LINQ to SQL
  • Runtime design libraries for Entity Framework and WCF Data Services
  • Managed Extensibility Framework (MEF)
  • Dynamic types
  • Parallel-programming features, such as Task Parallel Library (TPL), Parallel LINQ (PLINQ), and Coordination Data Structures (CDS)
  • Debugging client applications
  • 公共语言运行时 (CLR)
  • 点击一次
  • Windows 窗体
  • Windows 演示基础 (WPF)
  • Windows 通信基础 (WCF)
  • 实体框架
  • Windows 工作流基础
  • 演讲
  • XSLT 支持
  • LINQ 到 SQL
  • 实体框架和 WCF 数据服务的运行时设计库
  • 托管可扩展性框架 (MEF)
  • 动态类型
  • 并行编程功能,例如任务并行库 (TPL)、并行 LINQ (PLINQ) 和协调数据结构 (CDS)
  • 调试客户端应用程序

And the following as not being included:

以及以下不包括在内:

  • ASP.NET
  • Advanced Windows Communication Foundation (WCF) functionality
  • .NET Framework Data Provider for Oracle
  • MSBuild for compiling
  • ASP.NET
  • 高级 Windows Communication Foundation (WCF) 功能
  • 用于 Oracle 的 .NET Framework 数据提供程序
  • 用于编译的 MSBuild

回答by Simon P.

Cameron MacFarland nailed it.

卡梅伦·麦克法兰 (Cameron MacFarland) 做到了。

I'd like to add that the .NET 4.0 client profile will be included in Windows Updateand future Windows releases. Expect most computers to have the client profile, not the full profile. Do not underestimate that fact if you're doing business-to-consumer(B2C) sales.

我想补充一点,.NET 4.0 客户端配置文件将包含在Windows 更新和未来的 Windows 版本中。预计大多数计算机都具有客户端配置文件,而不是完整的配置文件。如果您从事企业对消费者(B2C) 销售,请不要低估这一事实。