[英]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的详细信息
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 appso ASP.Net应用
o Server-side ASMX based web serviceso基于服务器端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.