You are here

.NET Availability and Viability With Portable Apps

John T. Haller (Updated: May 10, 2014, Created: August 16, 2007)

A few people have asked about whether certain .NET-based applications can be made into portable apps. 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, Some Compatibility Issues

.NET is currently available in multiple versions (1.0, 1.1, 2.0, 3.0, 3.5, 4.0, 4.5 and 4.5.1), more if you count the various service packs. In many cases, applications written for one version of the .NET framework will work on a later version. In some cases, certain changes will break some applications or features, however. Microsoft refers to these as "Breaking Changes" (Example: 2.0 Breaking Changes). So, for example, some .NET 1.1 applications will run just fine on a PC with only the .NET 2.0 runtime installed whereas others will not run unless the .NET 1.1 runtimes are installed.

.NET Framework Runtime Bundling and Installation

The .NET Framework has been bundled with Windows for the last seven years.  Windows Vista first included .NET pre-installed (version 3.0 of the framework). Windows 7 includes version 3.5. Windows 8 includes version 4.5/4.0 but requires an administrator to manually enable 2.0/3.0/3.5 support and drops support entirely for 1.0/1.1. For versions of the .NET framework that are not pre-installed, the .NET runtime must be downloaded and installed on each PC by a user logged on with administrative privileges. The download size ranges from 50MB to up to 200MB depending on configuration and version. The .NET Framework is made available for direct download from Microsoft's website as well as Windows Update where it is listed as an optional update, meaning that it will not be installed by default unless patching an already-installed version (see an example of Windows XP). Most users only apply critical/high priority updates as these are the only ones Windows is configured to automatically apply. The installation process can take 15 minutes or more and requires closing all running programs and restarting the PC, so even in a situation with admin rights, installing and then removing is unreasonable.

.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 Windows PCs.NET Version
1.0/1.12.03.03.54.04.5
Windows 8/8.113.49%Not AvailableMust EnableMust EnableMust EnableIncludedIncluded
Windows 754.26%Compatible*IncludedIncludedIncludedDownloadDownload
Windows Vista3.18%Compatible*IncludedIncludedAutomatically
Updated To
DownloadDownload
Windows XP28.95%DownloadDownloadDownloadDownloadDownloadNot Available
Windows 20000.03%DownloadDownloadNot AvailableNot AvailableNot AvailableNot Available
Windows NT0.08%DownloadNot AvailableNot AvailableNot AvailableNot AvailableNot Available
Windows PCs With .NET Version Included57.44%57.44%57.44%54.26%13.49%13.49%
Windows PCs Compatible With .NET Version86.51%99.91%99.88%99.88%99.88%70.93%

Statistics from Net Applications for April 2014 adjusted to include Windows PCs only.

* Compatible indicates that most apps written for this version of the .NET framework should work out of the box on this version of Windows with the exceptions of apps that fall afoul of the "Breaking Changes" as described earlier in this document.

Conclusion

Today, your chances of encountering a PC equipped with the proper version of the .NET Framework are quite a toss-up. Most older Windows XP PCs in public locations (net cafes, coffee shops, libraries, hotel business centers, school computer labs, etc) simply won't have .NET installed. Windows Vista and 7 machines in public locations will have .NET Framework 3.5 installed but may not have anything later, depending on how they have been updated. And the majority of Windows 8/8.1 machines will have support for version 4.0 and up working, but 2.0/3.0/3.5 will be disabled until an administrator manually enables it.

Of course, your personal results may vary greatly as you may be using a Windows 7 or 8 PC at home or you may have the .NET Framework installed at work due to corporate applications that require it. Overall, however, 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 a large number of PCs you encounter in the wild.