How .NET Framework 3.5 setup checks for its prerequisites behind the scenes

The .NET Framework 3.5 setup package is a chainer that installs multiple packages behind the scenes.  Before installing anything, it performs an inventory of the state of the system being installed on and decides which packages need to be installed on the system during setup based on what it finds on the system.

The .NET Framework 3.5 Administrator Deployment Guide lists the prerequisite packages that setup installs on each supported OS and describes the command lines that can be used to install them silently, but it does not describe how to determine whether or not a system already has any of the prerequisites installed in order to optimize the deployment process.

The following is a list of all prerequisites for .NET Framework 3.5 setup and the exact logic that .NET Framework 3.5 setup uses behind the scenes to determine whether or not each of them is installed on a user's system, and whether or not setup will block installation if they are not present or will automatically install them for the user.

Note that all of the OS install state, file version and registry version information listed below comes from the file baseline.dat that is included in the .NET Framework 3.5 self-extracting setup package.

Windows XP SP2

On Windows XP systems, .NET Framework 3.5 setup checks the following registry value to determine the OS service pack state:

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows]
CSDVersion >= 512

Setup will block if the necessary service pack is not found, and the user must manually update their system before setup can proceed.

Windows Server 2003 SP1

On Windows Server 2003 systems, .NET Framework 3.5 setup checks the following registry value to determine the OS service pack state:

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows]
CSDVersion >= 256

Setup will block if the necessary service pack is not found, and the user must manually update their system before setup can proceed.

Windows Installer 3.1

.NET Framework setup only checks for this prerequisite on Windows XP because the necessary Windows Installer version is a part of the OS on other supported platforms.  To determine installation state, it checks the version of the following file:

%windir%\system32\msi.dll >= 3.1.4000.2435

Setup will block if the necessary version is not found, and the user must manually update their system before setup can proceed.

Software rasterizer for the DirectX 9.0 SDK (RGB Rasterizer)

.NET Framework 3.5 setup only attempts to install this component on Windows XP and Windows Server 2003.  To determine installation state, it checks the version of the following file:

%windir%\system32\rgb9rast_2.dll >= 9.15.735.0

Setup will install this package if the necessary version is not found on the system.

MSXML 6.0

.NET Framework 3.5 setup only attempts to install this component on Windows XP and Windows Server 2003.  To determine installation state, it checks the version of the following file:

%windir%\system32\msxml6.dll >= 6.0.3888.0

Setup will install this package if the necessary version is not found on the system.

Windows Imaging Component

.NET Framework 3.5 setup only attempts to install this component on Windows XP and Windows Server 2003.  To determine installation state, it checks the version of the following file:

%windir%\system32\windowscodecs.dll >= 6.0.5840.16388

Setup will install this package if the necessary version is not found on the system.

.NET Framework 2.0 SP1 (Windows XP and Windows Server 2003)

On Windows XP and Windows Server 2003, .NET Framework 3.5 setup checks for the existence of the MSI-based version of the .NET Framework 2.0 SP1.  To determine installation state, it checks the following registry value:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727]
Version >= 2.1.21022

Setup will install this package if the necessary version is not found on the system.

.NET Framework 2.0 SP1 (Windows Vista and Windows Server 2008)

On Windows Vista and Windows Server 2008, .NET Framework 3.5 setup checks for the existence of the .NET Framework 2.0 SP1 OS update package because the .NET Framework 2.0 is an OS component on these OS's.  To determine installation state, it checks the version of the following file:

%windir%\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll >= 2.0.50727.1433

Setup will install this package if the necessary version is not found on the system.

XML Paper Specification Shared Components (XPS)

.NET Framework 3.5 setup only attempts to install this component on Windows XP and Windows Server 2003.  To determine installation state, it checks the version of the following file:

%windir%\system32\prntvpt.dll >= 6.0.6000.16438

Setup will install this package if the necessary version is not found on the system.

.NET Framework 3.0 OS component (Windows Vista and Windows Server 2008)

On Windows Vista and Windows Server 2008, .NET Framework 3.5 setup checks for the existence of the .NET Framework 3.0 component that ships as a part of the OS.  To determine installation state, it checks the following registry value:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup]
InstallSuccess = 1

If the .NET Framework 3.0 SP1 OS component is not found on the system, setup will use a technique like the one described in this blog post to cause the OS to install the component.

.NET Framework 3.0 SP1 (Windows XP and Windows Server 2003)

On Windows XP and Windows Server 2003, .NET Framework 3.5 setup checks for the existence of the MSI-based version of the .NET Framework 3.0 SP1.  To determine installation state, it checks the following registry value:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0]
Version >= 3.1.21022

Setup will install this package if the necessary version is not found on the system.

.NET Framework 3.0 SP1 (Windows Vista and Windows Server 2008)

On Windows Vista and Windows Server 2008, .NET Framework 3.5 setup checks for the existence of the .NET Framework 3.0 SP1 OS update package because the .NET Framework 3.0 is an OS component on these OS's.  To determine installation state, it checks the following registry value:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup]
Version >= 3.0.04506.648

Setup will install this package if the necessary version is not found on the system.

.NET Framework 3.5

On all supported operating systems, .NET Framework 3.5 setup checks for the existence of the main .NET Framework 3.5 MSI package.  To determine installation state, it checks the following registry value:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5]
Version >= 3.5.21022.08

Setup will install this package if the necessary version is not found on the system.

Additional information

The .NET Framework 2.0 SP1 and .NET Framework 3.0 SP1 also ship as standalone installation packages that can be installed independently from the .NET Framework 3.5.  Each of these packages includes a subset of the above prerequisites and uses the same logic described above to determine whether or not each prerequisite is already installed.  The following is a list of which of the above prerequisites are required for the .NET Framework 2.0 SP1 and 3.0 SP1:

Prerequisites for the .NET Framework 2.0 SP1:

  • Windows XP SP2
  • Windows Server 2003 SP1
  • Windows Installer 3.1

Prerequisites for the .NET Framework 3.0 SP1:

  • Windows XP SP2
  • Windows Server 2003 SP1
  • Windows Installer 3.1
  • Software rasterizer for the DirectX 9.0 SDK (RGB Rasterizer)
  • MSXML 6.0
  • Windows Imaging Component
  • .NET Framework 2.0 SP1 (Windows XP and Windows Server 2003)
  • .NET Framework 2.0 SP1 (Windows Vista and Windows Server 2008)
  • XML Paper Specification Shared Components (XPS)
  • .NET Framework 3.0 OS component (Windows Vista and Windows Server 2008)

Here are links to some additional useful information related to .NET Framework 3.5 deployment: