Partilhar via


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:

Comments

  • Anonymous
    July 23, 2008
    ADO.NET EF BETA 3 seems to use the below LaunchCondition.  Any ideas why? It sure didn't like my .NET 3.5 SP1. Installed OR (DP_NETFX35_INSTALLED_VERSION >= "3.5.20904.00") and DP_NETFX35_INSTALLED_VERSION <= "3.5.21203.00")

  • Anonymous
    July 23, 2008
    Hi Christopher - From what I can tell, that ADO.NET Entity Framework beta 3 standalone package isn't supported on systems that have builds of .NET 3.5 SP1 installed because the functionality has been folded into the .NET Framework 3.5 SP1 and VS 2008 SP1 and those products will be the official release vehicle for it. The .NET Framework 3.5 RTM version number is 3.5.21022.08, which falls within the range that it is checking for.  I'm not sure why it would be checking for a range of versions instead of an exact version in this case though. If you've got the .NET Framework 3.5 SP1 installed, you shouldn't need this ADO.NET Entity Framework beta anymore though.  You won't be able to install the standalone Entity Framework tools, but you should get equivalent functionality by installing the VS 2008 SP1 build that corresponds to the .NET Framework 3.5 SP1 build that you have. Hopefully this helps.

  • Anonymous
    July 23, 2008
    Thanks Aaron.  Now I'm wondering what would happen if (ok, maybe not if) fixed the launch condition and installed the Beta 3 over the SP1 anyways..... :-)

  • Anonymous
    July 23, 2008
    Hi Christopher - I can't say for sure what would happen there.  You shouldn't need to do that though - the functionality in the older ADO.NET EF Beta 3 should exist in 3.5 SP1.  Is there something that is missing from 3.5 SP1 that is leading you down this path?

  • Anonymous
    July 24, 2008
    No, it was just a case of me setting up a development environment for a project that I know nothing about and being told here's the list of dependencies that you need to install. I was working down the list when I got the error message and I (probably too hastily) grabbed the sledge hammer to make it fit. :-)

  • Anonymous
    July 28, 2008
    PingBack from http://ramsonit.wordpress.com/2008/07/28/how-net-framework-35-setup-checks-for-its-prerequisites-behind-the-scenes/

  • Anonymous
    September 19, 2008
    PingBack from http://riteshhowto.wordpress.com/2008/09/19/how-net-framework-35-setup-checks-for-its-prerequisites-behind-the-scenes/

  • Anonymous
    November 19, 2008
    Hi Aaron Is it really necessary to install .net framework 3.0 as a prerequisite for .net framework 3.5? Isn't there a way to install 3.5 without 3.0? I would install 3.0, but I don't want that Windows Cardspace on my system. As I know 3.5 doesn't contain Cardspace application.

  • Anonymous
    November 19, 2008
    Hi Atolica - Yes, it is necessary to install the .NET Framework 3.0 as a prerequisite for 3.5.  The 3.5 functionality does not work on its own - it adds to existing 2.0 and 3.0 functionality.

  • Anonymous
    August 25, 2009
    The comment has been removed

  • Anonymous
    August 25, 2009
    Hi Ran Davidovitz - I don't know of any registry values that are set by that package.  It is a very simple package that installs that one file and doesn't create any registry values.  I'd suggest checking the return code for the package and then re-checking the version of the file after running the package to verify that it installed correctly.

  • Anonymous
    February 13, 2012
    I m Having Problem With Installing .net 3.5 on windows server 2003 for running web app or pages i m totally confused ............. the server is not running applications above 2.0 ............. please any help me ........

  • Anonymous
    February 13, 2012
    Hi Mahi Bisht - Can you please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your setup log files, post the file named %temp%vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com), and then reply back here and provide a link that I can use to download your log files and take a closer look?

  • Anonymous
    August 01, 2013
    The comment has been removed

  • Anonymous
    August 02, 2013
    The comment has been removed