简体   繁体   English

我应该定位哪个版本的.NET框架?

[英]What version of the .NET framework should I target?

I'm a desktop C# developer (that is not ASP) and am wondering about version targeting for small personal projects. 我是桌面C#开发人员(不是ASP),我想知道小型个人项目的版本定位。 These are, of course, trying to reach as wide an audience as possible, and so I've been targeting .NET 3.0 (which is the latest version on a Windows Vista system without any service packs) and 2.0 (which is simply the most compatible version compatible with VS2008). 当然,这些都是为了尽可能扩大受众范围,所以我一直瞄准.NET 3.0(这是没有任何服务包的Windows Vista系统上的最新版本)和2.0(这是最简单的与VS2008兼容的兼容版本)。

Unfortunately, this precludes me from learning any technologies such as LINQ introduced post 3.0, and, with an upcoming switch to VS2010, I'm wondering if I should target the new 4.0 platform at the expense of uses without the latest and greatest, or should I just stick to trying to reach as wide a userbase as possible? 不幸的是,这使我无法学习任何技术,例如3.0版后推出的LINQ,并且即将转向VS2010,我想知道我是否应该以牺牲用户为代价来定位新的4.0平台,而不是最新的和最好的,或者应该我只是坚持尝试尽可能广泛的用户群?

I would recommend moving to the .Net 4.0 Client Profile. 我建议转到.Net 4.0客户端配置文件。

Although it doesn't have a large install base yet, it's a small download that your users can easily install. 虽然它还没有大型安装基础,但用户可以轻松安装的下载很少。

If you don't want your users to need to download the framework, you should target 3.5, which most people already have . 如果您不希望用户需要下载框架,则应将目标定为3.5,这是大多数人已经拥有的

I would just use 3.5 or 4.0(if it where me I would go for 4.0). 我只会使用3.5或4.0(如果我在哪里,我会去4.0)。 It's not like it will cost anything for them to update to the latest framework and probably will be included in the auto updates. 它不会像他们花费任何东西来更新到最新的框架,并可能会包含在自动更新中。

I would not just strictly do 2.0 anymore since in my opinion it's like rewarding bad behavior like programming these days for IE 6. If no developers say where going to move onto the newer and better versions of the software then what incentive do the people who have the older stuff to upgrade? 我不再仅仅严格执行2.0了,因为在我看来,这就像回报IE 6编程这样的不良行为。如果没有开发人员说要转向更新更好的软件版本,那么有什么奖励呢?旧的东西升级?

Once lots of their favorite stuff stops working they will upgrade fast. 一旦他们最喜欢的东西停止工作,他们将快速升级。

I usually use .NET 2.0. 我通常使用.NET 2.0。 The reason being many people (at least in my case) are running at least Windows Vista or Windows 7, which comes with .NET 2.0 (I believe). 原因很多人(至少在我的情况下)至少运行Windows Vista或Windows 7,它带有.NET 2.0(我相信)。 If they have XP, many have already have .NET 2.0 as well. 如果他们有XP,许多人已经拥有.NET 2.0。

Believe it or not, many people still have slower connections, so downloading a newer framework (eg 3.5 or 4.0) might be a bit much and turn them away from your product. 信不信由你,很多人仍然有较慢的连接,所以下载一个较新的框架(例如3.5或4.0)可能会有点多,并使他们远离你的产品。

In the end it depends on your clients and how much you know about them. 最后,它取决于您的客户以及您对它们的了解程度。 If you're not sure, either go with 2.0 or 3.5. 如果您不确定,请使用2.0或3.5。 I wouldn't go to 4.0 just yet as it's relatively new and not many people have adopted it yet. 我还不会去4.0,因为它相对较新,并没有很多人采用它。

Here are some usage statistics from our WPF application that you might find interesting. 以下是您可能感兴趣的WPF应用程序中的一些使用情况统计信息 If you're going the WPF road, then I would highly recommend using .NET 4. It's simply so much better in terms of font and image rendering. 如果您正在进行WPF之路,那么我强烈建议您使用.NET 4.在字体和图像渲染方面,它的表现要好得多。 We currently have 24% of our users running the .NET 4 version. 我们目前有24%的用户运行.NET 4版本。 But we do have a .NET 3.5 version to make installation smoother. 但我们确实有.NET 3.5版本,以使安装更顺畅。

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

相关问题 我应该使用类库来定位.NET Framework和C#版本? - What .NET Framework and C# version should I target with my class library? 如果我必须同时针对 Dot Net Core 3.0 和 .Net Framework 4.7.2,我应该在库中使用哪个 .Net 标准版本 - Which .Net standard version should i use in a library if i have to target both Dot Net Core 3.0 and .Net Framework 4.7.2 以编程方式检查.NET Framework版本-我应该吗? - Programatically check for version .NET Framework - Should I? 什么版本的 .Net 框架应该针对最终用户应用程序 - What version of .Net framework should be targeted for end user apps 什么.NET Framework版本 - What .NET Framework version Target.NET 框架版本与安装的 .NET 框架版本 - Target.NET framework version vs .NET framework version installed 从 .Net 程序集中检索目标框架版本和目标框架配置文件 - Retrieve Target Framework Version and Target Framework Profile from a .Net Assembly 我应该在C#程序中使用.NET Framework 3.5检测Windows 8.1的正确操作系统版本? - What should I do in my C# program to detect the correct OS version for Windows 8.1, using .NET Framework 3.5? 在为.NET选择依赖注入框架时,我应该考虑什么 - What should I consider when choosing a dependency injection framework for .NET 在为.Net选择模拟框架时,我应该考虑什么 - What should I consider when choosing a mocking framework for .Net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM