Redistributing the .NET Framework 2.0

 

Microsoft Corporation

March 2006

Applies to:
Microsoft .NET Framework 2.0

Summary: Applications and controls written for the .NET Framework version 2.0 require the .NET Framework Redistributable Package version 2.0 to be installed on the computer where the application or control runs. The .NET Framework redistributable package is available as a stand-alone executable file, Dotnetfx.exe. This article describes where to obtain Dotnetfx.exe, and how to use it to deploy .NET Framework applications. (4 printed pages)

Note If you choose to use the Dotnetfx.exe or redistribute it with an application created by you, you must have a valid licensed copy of the Microsoft .NET Framework SDK, or Visual Studio, and any use or distribution of Dotnetfx.exe is subject to the terms of the end user license agreement you received with the Microsoft .NET Framework SDK, or Visual Studio. If you do not have a validly licensed copy of the Microsoft .NET Framework SDK, or Visual Studio, you are not authorized to use or distribute Dotnetfx.exe.

Introduction

The version 2.0 release of the Microsoft .NET Framework provides one redistributable installer that contains the common language runtime and .NET Framework components that are necessary to run .NET Framework applications. The .NET Framework redistributable is available as a stand-alone executable file, Dotnetfx.exe. The .NET Framework requires a license agreement that gives you specific rights to redistribute Dotnetfx.exe. If you have previously installed the .NET Framework SDK version 2.0, Microsoft Visual Studio 2005, or downloaded Dotnetfx.exe from the Web, you have accepted the license agreement for Dotnetfx.exe. For the terms of the license agreement, see the .NET Framework Redistributable License Terms (EULA).

You can manually launch and install Dotnetfx.exe on a computer, or it can be launched and installed as part of the setup program for a .NET Framework application. Note that administrator privileges are required to install Dotnetfx.exe. If you have previously installed Microsoft Visual Studio 2005, you do not need to install Dotnetfx.exe.

There are minimum configuration requirements that must be met in order to install Dotnetfx.exe. For more information about software and hardware requirements and recommendations, see Minimum Configuration Requirements.

Obtain the .NET Framework Redistributable Package

You can download Dotnetfx.exe from MSDN Online or from the Microsoft Windows Update Web site.

Alternately, you can get the redistributable package on a Microsoft .NET Framework DVD. The redistributable packages for .NET Framework 2.0 are available on the DVD in the directory

<LANGUAGE_CODE>\Runtime\dotnetfx.exe

where <LANGUAGE_CODE> represents locale language, or from Disc 1 of the Microsoft Visual Studio 2005 in the \wcu\dotNetFramework directory.

If you need to have users install the .NET Framework from the Internet, do not post the .NET Framework Redistributable Package. Instead, direct users to the Microsoft Windows Update Web site.

.NET Framework 2.0 Deployment Scenarios

This section provides .NET Framework SDK users with deployment scenarios for redistributing the .NET Framework using Dotnetfx.exe. Scenarios are provided for deploying Dotnetfx.exe using an electronic software distribution tool, manually installing from a download location on a network share, intranet, or the Microsoft Web site, and using the Setup.exe Bootstrapper sample to create a single setup project to install both Dotnetfx.exe and a .NET Framework application. Because Dotnetfx.exe is a significant runtime component, you must have administrator privileges in order to install it on a computer.

Distributing Dotnetfx.exe Using an Electronic Software Distribution Tool

Corporations that deploy .NET Framework applications will find it easier to deploy the .NET Framework once to all users' computers, rather than including it with each application that requires it. Various electronic distribution tools are available for deploying Dotnetfx.exe and, when necessary, MDAC 2.8 SP1 or later across a secure network. There are two requirements for any tool that you use to distribute Dotnetfx.exe:

  1. The tool must be capable of running a remote installation on a remote computer
  2. The tool must be able to run with administrator privileges.

The following links describe how to use Microsoft Systems Management Server (SMS) and Microsoft Active Directory to deploy the .NET Framework redistributable package across a network.

Manual and Silent Installation Options of Dotnetfx.exe

You can direct users to a download location for Dotnetfx.exe on a network share, the Microsoft Download Center or a location on the Microsoft Windows Update Web site. A user can run and install Dotnetfx.exe on the computer on which they want to deploy and run a .NET Framework application. Note that in order to install Dotnetfx.exe, you must have administrator privileges on the computer.

The .NET Framework Redistributable Package version 2.0 uses a Windows Installer package that wraps it into the single, self-extracting executable file Dotnetfx.exe. The Dotnetfx.exe executable file launches Install.exe, which performs platform checks, and then launches the Windows Installer package (.msi file).

Table 1 describes the command line options you can specify when installing Dotnetfx.exe. To specify options when installing Dotnetfx.exe, you must pass the options to the Install.exe wrapper using the /c: option.

Syntax:

dotnetfx [/q[:a]] [/t:<temp_path> [/c]]
dotnetfx [/q[:a]] [/c:"Install [/l <log_file>] [/q]"]

Table 1. Command-line options for Dotnetfx.exe

Option Description
/t:<temp_path> [/c] Specifies temporary working folder <temp_path>.

If used in conjunction with optional /c, will only extract installation files, no installation will be performed.

/c:<command> Overrides default command executed after extraction of installation files.

Default is Install.exe /l %temp%\dd_netfx20MSIxxxx.txt /q

(see Table 2 for Install.exe options)

/q[:a] Specifies quiet install mode. Suppresses the display of the setup user interface. You may also include optional :a to suppress the extraction user interface as well.

Table 2. Command-line options for Install.exe

Option Description
/l <logfile_name> Specifies name and path for verbose MSI log. The default is %temp%\dd_netfx20MSIxxxx.txt
/q Specifies quiet install mode. Suppresses the display of the setup user interface and progress bar.
/qu Specifies quiet uninstall mode. Suppresses the display of the uninstall interface and progress bar.

Whenever you launch an installation of the .NET Framework, J# redistributable package, or language pack, you should pass the /l switch to enable verbose logging. By doing this, the setup package will create a verbose log file in the %temp% directory by default. Dotnetfx.exe as well as langpack.exe redistributables will create an additional log file, dd_netfx20UIxxxx.txt and dd_netfxLP20UIxxxx.txt respectively to log wrapper execution. This will allow for more detailed debugging of any failures without requiring the user to set a registry key to enable logging, re-run the setup, and reproduce the failure in order to produce verbose log files.

Examples:

Simply executing dotnetfx.exe will launch standard installation wizard, providing user with license agreement screen, and allowing finishing install on acceptance.

The following command launches a silent installation of Dotnetfx.exe.

dotnetfx.exe /q:a /c:"install /q"

The following command launches a silent installation of langpack.exe (any language pack).

LangPack.exe /q:a /c:"install /q"

A silent install suppresses the display of all user interface and error messages returned by Dotnetfx.exe and Install.exe, which is contained within Dotnetfx.exe. Specifying the /q:a and /q options for a silent install allows for a standardized user installation experience. Specifying the /l option creates a setup log files, dd_netfx20*.txt and dd_netfxLP20*.txt for the Framework and Language Pack respectively, in the %temp% directory where all errors are logged.

.NET Framework 2.0 Deployment Using Visual Studio 2005

This article describes how to use Microsoft Visual Studio 2005 to create or modify a deployment project to use the Setup.exe Bootstrapper that will allow to preinstall prerequisites for your .NET application, such as .NET Framework 2.0 and other common packages.