Choosing a .NET Framework Version

Whether you’re starting a new project or just releasing a new version of a tried-and-true application that’s been around forever, one major decision you need to make – and make right – is the framework version you choose to target.  This is more complicated a question today than ever before, but since the release of .NET 4, there are good choices available regardless of your scenario.  Here’s a quick guide:

.NET 1.0

This is now completely obsolete.  Don’t use this for new projects.  Ever.  If you’re supporting an application that uses this, at LEAST upgrade to 1.1, and ideally, 2.0.  It’s generally that not hard, and the 1.0 release of .NET has some ugly little surprises hidden away, just waiting for the opportunity to ruin your week.  Microsoft no longer supports this version, and yes, there are serious bugs.

When to use:

  • Never.

When to upgrade:

  • Long, long ago.

.NET 1.1

This is pretty old.  Don’t use this for anything new, and avoid active development on this platform. It’s still safe to use, though, so feel free to maintain code running on this for another few years.  In fact, this was the first version of .NET to be included with an OS (Windows Server 2003), so Microsoft will continue to support this until 2015 at least.

When to use:

  • Your application must support Windows NT 4.0.
  • Maintaining applications for which active development has ceased.

When to upgrade:

  • Immediately, if active development continues.
  • In the next few years, if long-term support is required.

.NET 2.0

I love this release.  This is when .NET came of age, and it’s still used all over the place.  As I’ll describe below, there are even reasons why you might want to base new development on this release.  Sure, it might not have all the fancy new features the newer releases include, but the core functionality is rock solid, and everything you need for a simple, timeless, reliable application is there.  It’s the last .NET release to run on Windows 2000, and if will even work under Windows 98 (do people still use that?).  The installer is just over 20 MB, and installation is pretty painless, but most modern computers out there will have this installed already.  Upgrading from .NET 1.x to 2.0 is usually pretty smooth.

This is also a great version of the framework to choose if you’ll be supporting Mono (which allows your code to run on a variety of devices and operating systems, including Linux and MacOS).

When to use:

  • Your application must support Windows 98, Windows ME, or Windows 2000.
  • You want to avoid requiring .NET Framework updates as part of your deployment process as much as reasonably possible.
  • Maintaining applications built on .NET 2.0 or earlier.
  • Your application must run under Mono.

When to upgrade:

  • Active development continues, and you want access to features available only in newer versions of .NET.

.NET 3.0

This is where things start to get ugly.  .NET 3.0 is actually not a full release of the .NET Framework.  It’s really just .NET 2.0 plus some new technologies thrown in (WPF, WCF, WF and a few other oddities).  This version was included with Windows Vista, but was never really popular with developers.  Unless you know exactly why this is the version you need, you should avoid this one.  It’s just… weird.

When to use:

  • You require features not available in .NET 2.0, AND your application must not require Framework updates, AND your application will only run on Windows Vista or newer.
  • Maintaining applications built on .NET 3.0.

When to upgrade:

  • Now, if active development continues (unless you really know why you’re using 3.0)

.NET 3.5

The Beast.  I really hate this release.  This version continues the weird existence of 3.0.  It’s really just good old .NET 2.0, plus a bunch of changes and additions.  As a developer, there’s a lot of new stuff here since 2.0 (LINQ is introduced, WCF and WPF are a bit more usable, ASP.NET includes AJAX support, and there are a bunch of other new toys and language improvements to play with).  But administrators have learned to hate this release.  The installer is over 230MB, can take HOURS to run, and often requires several reboots.  Automated deployment is an absolute joke; it’s probably easier to upgrade the entire OS than get this release out over group policy (see http://msdn.microsoft.com/en-us/library/cc160717(VS.90).aspx, and check out the bitching in the comments).  I was involved in an upgrade project where updating one single server turned into an overnight ordeal, and pushing updates through group policy, WSUS, or any other modern management software was abandoned in favour of walking around to each and every machine.

This was the latest version of .NET for several years, and it presented a real dilemma for developers: a) stick with the tried and true .NET 2.0 and make do without any enhancements introduced since 2007, b) move to 3.5 and deal with the endless problems associated with the upgrade, deployment, and support processes, hoping the next version wouldn’t be even worse, or c) abandon all hope, give up on .NET, and move to a different development platform.  I struggled with this dilemma for a couple years myself – and don’t forget, this was the Windows Vista era.  Microsoft seemed to be losing ground on all fronts, alternatives looked better than ever, and the future was really tough to call.  I spend serious time playing around with alternatives to .NET, and decided I’d give Microsoft one more release to make things right.  If they didn’t, I would have to start moving away from Microsoft technologies.

As I said: this one is The Beast.

When to use:

  • You require features not available in .NET 2.0, AND your application must not require Framework updates, AND your application will only run on Windows 7.
  • Maintaining applications built on .NET 3.5.

When to upgrade:

  • Now, if active development continues (unless you really know what you’re doing and you don’t care about the pain you cause your users and administrators).

.NET 3.5 Client Profile

This was an attempt to deal with the horrific 3.5 framework size and updating process.  The Client Profile is a subset of .NET that includes just the functionality typically required for client applications, and does not include any server functionality.  Unfortunately, it doesn’t do much to solve the original problems, and brings a new range of pesky little quirks.  Also, there’s a good chance you’ll run into a situation in the middle of development that requires a feature not available under the Client Profile.  I generally advise ignoring this one.

When to use:

  • You must use .NET 3.5, and are certain you require only the reduced functionality included in this release.

When to upgrade:

  • Now, if active development continues.
  • Upgrading to the full version of .NET 3.5 is usually about three clicks, so feel free to do this if you run into a Client Profile-specific problem.

.NET 4.0

The latest, the greatest, and a long-overdue upgrade everybody should get behind.  This is the first true update to the CLR since .NET 2.0 was released.  It includes all the developer magic released in 3.5, adds more toys and polish, brings some very welcome language improvements, improves performance and security, makes WCF usable, makes WPF almost bearable, and generally makes life much happier for everyone.  Use it.  Love it.  Preach it.

The full installer for .NET 4.0 is less than 50 MB, and there’s also a web installer that will download just the required components.  Installation is generally pretty painless, but can occasionally require a reboot.  You can also get this update through Windows Update or WSUS.  Side-by-side installation with previous versions works, and works well.

When to use:

  • You don’t need to support pre-WinXP machines.
  • You don’t mind requiring your users to install a (simple and easy) framework update.

When to upgrade:

  • Not for close to a decade at least, I’m guessing.  This is the one to go with if you hear people start to talk about ‘Future Proofing’.

It’s not always a good idea to change tools in the middle of a project, so depending on your restraints, you might not be able to make the leap right away.  But upgrading between .NET Framework versions is usually easy, and .NET 4.0 is well worth it.  Do note that your clients will need to have Server 2003 or Windows XP available (with certain service pack requirements).

.NET 4.0 Client Profile

The Client Profile is also available under .NET 4.0, although the installation package is only about 10MB smaller.  I don’t really see the point to this, but it’s there if you want it.  It might be wise to start development under the Client Profile so you have the option to go both ways, and then move to the full version of .NET 4.0 if the need arises.  Or, you could just ignore it.

When to use:

  • Hell if I know.

When to upgrade:

  • You need something not available in the Client Profile.  Luckily, this is still a three-click task.

Of course, if you have a specific scenario that you think calls for a different version than this guide might suggest, go nuts.  Just be sure you know what you’re getting yourself into, and don’t forget: you might finish developing your application, but you’ll never finish supporting it, so be sure you consider deployment and security as part of your selection.

2 comments:

  1. Từ Hà Nội các bạn đi theo QL1A tới tp Lạng Sơn rồi đi QL4B tới Bình Liêu
    Chi phí cho chuyến đi cả xăng xe dự kiến 400k là thoải mái
    3: Đi biển Sầm Sơn, bãi cát vàng Nghi Sơn
    trung tâm kế toán tại lĩnh lam
    trung tâm kế toán tại vĩnh phúc
    trung tâm kế toán tại thanh trì
    Bãi cát vàng Nghi Sơn là 1 bãi biển đẹp với những hạt cát vàng to, ko giống cát mịn nên đi chân trần trên bãi biển rất thú vị
    5: Tắm biển Thiên Cầm - Hà Tĩnh

    ReplyDelete
  2. من خلال إغلاق مساحة الزحف ووضع التهوية الكافية في الحمامات والمطبخ والعلية الخاصة بك ، يمكنك إبقاء الرطوبة الزائدة خارج منزلك وجعلها أقل جاذبية للنمل الأبيض.شركة مكافحة النمل الابيض بالاحساء
    شركة مكافحة حشرات بالاحساء
    شركة رش مبيدات بالاحساء
    ارخص شركة مكافحة حشرات

    ReplyDelete


Copyright © 2010 Paul Guenette and Matthew Sleno.