.NET Availability and Viability With Portable Apps
John T. Haller, August 16, 2007 (Last Updated: October 2, 2007)
A few people have asked about whether certain .NET-based applications can be made into portable apps over the last few months. For the unfamiliar, .NET is a software component that provides a number of pre-built libraries as well as a runtime manager. Applications written with .NET require the proper version of the .NET runtime be installed in Windows to run. More details on what .NET is are available in the Wikipedia article on the .NET Framework.
Multiple Versions, Multiple Headaches
.NET is currently available in five different versions (1.0, 1.1, 2.0, 3.0 and 3.5), 10 if you count the various service packs. The problem is that one version isn't necessarily compatible with another. An application written for .NET 1.1 will not run on the .NET 2.0 framework and vice versa. So, each application needs the proper runtime installed. It looks like Microsoft is finally addressing this as .NET 3.0 includes support for .NET 2.0 applications.... though .NET 3.5 is going to be breaking some .NET 3.0 and .NET 2.0 applications.
.NET Framework Runtime Bundling and Installation
The .NET Framework has only been bundled with two versions of Windows to date (Windows Server 2003 and Windows Vista). For all other versions of Windows, the .NET runtime must be downloaded and installed on each PC by a user logged on with administrative privileges. The download size ranges from 20MB to 50MB depending on .NET runtime version and configuration. The .NET Framework is made available from Microsoft's website as well as Windows Update where it is listed as an optional update. Most users only apply critical/high priority updates as these are the only ones Windows is configured to automatically apply. (Note: If you already have a .NET version installed, service packs to that version will show up as critical/high priority updates.)
For a visual reference, please see the screenshot showing .NET on Windows Update.
.NET Portability
Several people have also asked about whether .NET itself can be made portable. The answer is no. .NET is heavily tied to the Windows operating system and requires an administrator to install. Plus, it is a closed source, commercial product, so, legally, we couldn't do it, anyway. So, we're left with just analyzing what PCs already have it and what PCs can have it added.
.NET Framework Availability By Version and Operating System
Using the compatibility information by operating system, compatibility of .NET versions with each other, bundling information with operating system and some quick overview statistics of operating system usage online, I've compiled a quick chart that shows you where .NET can be expected, where it's available for download and where it simply won't work.
| % of PCs | .NET Version | TheCounter | NetApplications | 1.0 | 1.1 | 2.0 | 3.0 | 3.5 |
|---|---|---|---|---|---|---|---|
| Windows 95 | 0.03% | 0.00% | Not Available | Not Available | Not Available | Not Available | Not Available |
| Windows NT | **6.19% | 0.61% | Download | Download | Not Available | Not Available | Not Available |
| Windows 98 | 1.83% | 0.89% | Download | Download | Download | Not Available | Not Available |
| Windows Me | 0.00% | 0.49% | Download | Download | Download | Not Available | Not Available |
| Windows 2000 | 5.21% | 3.32% | Download | Download | Download | Not Available | Not Available |
| Windows XP SP1 | 79.87% | 79.32% | Download | Download | Download | Not Available | Not Available |
| Windows XP SP2 | Download | Download | Download | Download | Download | ||
| Windows Server 2003 | ?% | ?% | ? | Included | Download | Download | Download |
| Windows Server 2003 R2 | ?% | ?% | ? | Included? | Included | Download | Download |
| Windows Vista | 0.00% | 7.38% | ? | Download | Included | Included | Download |
| Windows Server 2008 | 0.00% | 0.00% | ? | ? | Included | Included | ? |
| PCs With .NET Version Included (TheCounter) | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | ||
| PCs With .NET Version Included (NetApplications) | 0.00% | 0.00% | 7.38% | 7.38% | 0.00% | ||
| PCs Compatible With .NET Version (TheCounter) | 93.10% | 93.10% | 86.91% | 79.87% | 79.87% | ||
| PCs Compatible With .NET Version (NetApplications) | 84.63% | 92.01% | 91.40% | 86.70% | 86.70% | ||
The data above is from TheCounter and Net Applications for September 2007. Neither is considered a definitive source on actual usage but both taken together can give at least some idea of what to expect in the wild. It should be noted that TheCounter appears to be counting Windows Vista as Windows NT (**) to a major extent, so NetApplications numbers are more relevant at the moment.
Conclusion
Overall, your chances of encountering a PC equipped with the proper version of the .NET Framework are relatively low. Most pre-Vista PCs simply won't have it installed. Of course, your personal results may vary greatly as you may be using a Vista PC at home and work. Or you may have the .NET Framework installed at work due to corporate applications that require it. But, overall, for right now, applications based on .NET simply can't be considered portable due to the fact that the files they need can't be bundled portably and won't be on most PCs you encounter in the wild.