What .NET Framework version should I ship with; 2,

2020-02-12 03:08发布

My application uses 2.0. At some point in the future I may want to start using newer features added in later framework versions. Should I wait until then? Or are there advantages to updating to the latest .NET 3.5 now?

I suppose by the time I am ready for next spring's release 4.0 will be out. Perhaps I should stick with 2.0 for my fall release and save my customers the HD space and install time of another framework version?

14条回答
唯我独甜
2楼-- · 2020-02-12 03:13

.net 3.5sp1 bootstrapper is too slow especially if you are using asp.net application (compared to windows forms), in a machine which only has .net 2.0, it loads the whole framework and that means you are lookong at about 20-30 mins of download + install time on a moderate internet connection and machine speed.

查看更多
我想做一个坏孩纸
3楼-- · 2020-02-12 03:16

You should distribute your app with whatever version of .Net is the version you've done the most testing against. If you've been doing all your developing and testing in .Net 2.0, then ship with 2.0.

But you may owe it to your customers to test against 3.5 and ship with that, instead, for the sake of any bugs that have been fixed in the framework since 2.0 was released. The framework is already so large that there probably isn't any benefit to distributing an earlier version, even if it came before WCF, WPF, etc., unless you're paying bandwidth costs to distribute it, or the target device has limited storage space.

查看更多
乱世女痞
4楼-- · 2020-02-12 03:16

I've found version 2.0 to be the easiest version to target and deploy since a lot of people have it installed already, If a sizable portion of your client base use Vista you might consider upgrading to 3.0. Versions above that nearly always require an install which can be a pain for some users.

Edit: The "framework version going out of support" argument holds no water since 3.0 is an extension of 2.0 and 3.5 is an extension of that. By definition 2.0 will be supported as long as 3.5 is. Version 1.1 is the only version that is a completely separate runtime and is no longer supported.

查看更多
beautiful°
5楼-- · 2020-02-12 03:19

Don't forget that .Net 4.0 will be a little different from previous versions of the framework. .Net 4.0 will be installed side by side (SxS) .Net 3.5 and back. If you upgrade your app to use .Net 4.0 then your long term users (aka previous versions) will end up having to install a whole new version of the framework.

If your considering how much disk space you are going to use up on the client machines with your app and the framework, then don't forget this "hidden" use of extra space. If you upgrade your app now from 2.0 to 3.5 then your app might be able to exist longer with complete functionality without forcing the user to install a 2nd framework that uses up another 20+ MB of space.

查看更多
够拽才男人
6楼-- · 2020-02-12 03:20

If you are planning to upgrade to 3.5 SP1, you should consider using the New .NET Framework Client Profile Setup Package.

.NET 3.5 SP1 introduces a new setup package option for developers building .NET client applications called the ".NET Framework Client Profile". This provides a new setup installer that enables a smaller, faster, and simpler installation experience for .NET client applications on machines that do not already have the .NET Framework installed.

The .NET Framework Client Profile setup contains just those assemblies and files in the .NET Framework that are typically used for client application scenarios. For example: it includes Windows Forms, WPF, and WCF. It does not include ASP.NET and those libraries and components used primarily for server scenarios. We expect this setup package to be about 26MB in size, and it can be downloaded and installed much quicker than the full .NET Framework setup package.

The assemblies and APIs in the .NET Framework Client setup package are 100% identical to those in the full .NET Framework setup package (they are literally the same binaries). This means that applications can target both the client profile and full profile of .NET 3.5 SP1 (no recompilation required). All .NET applications that work using the .NET Client Profile setup automatically work with the full .NET Framework.

查看更多
混吃等死
7楼-- · 2020-02-12 03:20

I always use the most up-to-date version of the Framework. This may be a small up-front burden on users, but the app has a much longer life between upgrades. That may or may not be important to you, but consider:

If you had shipped an application in 2005 using .NET 1.1, the framework your app runs on is now out of mainstream support, and may have unpatched security vulnerabilities, or other serious problems which Microsoft may not deal with, and which you cannot compensate for in your own code. Your only alternative in 2008 is to get your users to upgrade their framework version now. And, as we all know, getting users to update things in a timely fashion can be problematic.

Likewise, consider your situation in 2011. If you program for .NET 3.5 now, your app, as-shipped, will be viable longer. If you ship for .NET 2.0 now, you'll be in the position, in a few years' time, of having to convince your users to upgrade their framework (code which has no perceived benefit to them, remember) so that you can properly support this application.

Also, if you plan to implement 3.5-class features (LINQ to SQL next year, for example), it's in your interest to ship for 3.5 now, rather than 2.0, as it will make deployment later less of a problem for you.

查看更多
登录 后发表回答