简体   繁体   English

什么时候是使用.NET Framework 4而不是.NET Framework 4 Client Profile的正确时间?

[英]When is the right time to use .NET Framework 4 rather than .NET Framework 4 Client Profile?

Perhaps the issue here is that I don't fully understand the differences between the Client Profile of .NET 4 and the (regular?) version of .NET 4... 也许这里的问题是我不完全了解.NET 4的客户端配置文件与.NET 4的(常规?)版本之间的区别...

When I begin a new project in Visual Studio 2010, it defaults to a target framework of .NET Framework 4 Client Profile. 当我在Visual Studio 2010中开始新项目时,它默认为.NET Framework 4客户端配置文件的目标框架。 Occasionaly, when using third party library's I will get compile erros if my project is setup for .NET Framework 4 Client Profile - switching to .NET Framework 4 fixes the issue. 偶尔,如果使用第三方库的第三方项目,则如果为.NET Framework 4客户端配置文件设置了我的项目,则我将获得编译错误-切换至.NET Framework 4可解决此问题。

I have always just dealt with this but today I decided to ask the question and figure when to use one over the other, and why there are two versions of the framework. 我一直只是处理这个问题,但是今天我决定问一个问题,弄清楚什么时候可以使用另一个,以及为什么有两个版本的框架。

EDIT: If I target .NET 4, should I be concerned that a normal desktop user won't be getting that Framework over Windows Update? 编辑:如果我的目标是.NET 4,我是否应该担心普通的台式机用户不会通过Windows Update获得该框架?

Concerning your edit: take a look here: .Net Framework 4 Full and Net Framework 4 Client Profile Targeting 关于您的编辑:在这里看看: .Net Framework 4 Full和Net Framework 4 Client Profile Targeting

This post by Scott Hanselman shows you what's in and what's out of the Client Profile: Scott Hanselman的这篇文章向您展示了“客户资料”中的内容和内容:

Towards a Smaller .NET 4 - Details on the Client Profile and Downloading .NET 迈向更小的.NET 4-有关客户端配置文件和下载.NET的详细信息

  • Supported on all OS that Full is 在支持完整版的所有操作系统上
  • Supported for x86 & x64 支持x86和x64
  • Client Profile is the framework that will be available on Windows Update for desktops 客户端配置文件是将在Windows Update桌面上提供框架
  • Supported in all aspect of VS (eg targeting, deployment project, etc) 在VS的所有方面均受支持(例如,定位,部署项目等)
  • Is the default target in almost all VS10 Client Project Templates (Winforms, WPF, VSTO, etc) 是几乎所有VS10客户端项目模板(Winforms,WPF,VSTO等)中的默认目标

This is the funny part: 这是有趣的部分:

The general idea is that they avoid installing things you don't need on a client machine. 通常的想法是,他们避免在客户端计算机上安装不需要的东西。 That means they won't install ASP.NET on your Mom's computer just because she wants a game. 这意味着他们不会仅仅因为妈妈想要玩游戏而在妈妈的计算机上安装ASP.NET。 Also, the .NET 4 Client profile is a proper subset of the .NET 4 "Full" Framework. 此外,.NET 4客户端配置文件是.NET 4“完整”框架的适当子集。

Here's a more detailed post: What's new in .NET Framework 4 Client Profile RTM 这是更详细的文章: .NET Framework 4 Client Profile RTM中的新增功能

When to use NET4 Client Profile and when to use NET4 Full Framework? 何时使用NET4客户端配置文件以及何时使用NET4完整框架?
NET4 Client Profile: NET4客户端配置文件:
Always target NET4 Client Profile for all your client desktop applications (including Windows Forms and WPF apps). 始终将NET4客户端配置文件的目标定位为所有客户端桌面应用程序(包括Windows窗体和WPF应用程序)。

NET4 Full framework: NET4完整框架:
Target NET4 Full only if the features or assemblies that your app need are not included in the Client Profile. 仅当客户端配置文件中未包含您应用所需的功能或程序集时,才将NET4 Full作为目标。 This includes: 这包括:

  • If you are building Server apps. 如果要构建服务器应用程序。 Such as: 如:
    o ASP.Net apps o ASP.Net应用
    o Server-side ASMX based web services o基于服务器端ASMX的Web服务
  • 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使用NET4中不推荐使用的System.Data.OracleClient.dll,它不包含在客户端配置文件中。
    o Use legacy Windows Workflow Foundation 3.0 or 3.5 (WF3.0 , WF3.5) o使用旧版Windows Workflow Foundation 3.0或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 如果您针对开发人员场景并且需要诸如MSBuild之类的工具,或者需要访问诸如System.Design.dll之类的设计程序集

It's worth mentioning that starting with .NET 4.5 there's no more a Client Profile . 值得一提的是,从.NET 4.5开始,不再有Client Profile It's been discontinued: http://msdn.microsoft.com/en-us/library/cc656912.aspx (link provided by CodingWithSpike ) 它已停产: http : //msdn.microsoft.com/zh-cn/library/cc656912.aspx (由CodingWithSpike提供的链接

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .NET Framework 4客户端配置文件与.NET Framework 3.5客户端配置文件 - .NET Framework 4 Client Profile vs .NET Framework 3.5 Client Profile .NET Framework 4 客户端配置文件是否安全? - Is .NET Framework 4 Client profile secure? 为什么有人会使用.NET Framework 4 Client Profile? - Why should someone use the .NET Framework 4 Client Profile? .Net Framework 4 Full 和 Net Framework 4 Client Profile Targeting - .Net Framework 4 Full and Net Framework 4 Client Profile Targeting .NET Framework 4.0客户端配置文件与.NET Framework 4.0 - .NET Framework 4.0 Client Profile vs .NET Framework 4.0 .NET Framework和.NET Framework客户端配置文件之间的区别 - Difference between .NET Framework and .NET Framework Client Profile 在为 Outlook 2010 创建插件时,可以针对 .NET 框架 3.5 或 .NET 框架 3.5 客户端配置文件 - It is possible to target .NET framework 3.5 or .NET framework 3.5 client profile when creating an Add-in for Outlook 2010 是否有可与.NET客户端配置文件一起使用的模拟框架? - Is there a mocking framework that works with the .NET Client Profile? .net 框架 4 客户端配置文件参考 .netframework 4.dll - .net framework 4 client profile with reference to .netframework 4 .dll 我的整个解决方案是否必须是 .NET Framework 而不是 .NET Core,因为我使用需要 .NET Framework 的 NuGet 包? - Does my whole solution have to be .NET Framework rather than .NET Core just because I use a NuGet package that needs the .NET Framework?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM