Using Visual Studio 2005 to Redistribute the .NET Framework 2.0

 

Microsoft Corporation

March 2006

Summary: This article describes how to use Microsoft Visual Studio 2005 to deploy Microsoft .NET Framework 2.0 applications with Dotnetfx.exe, the .NET Framework redistributable package. (7 printed pages)

Applies to:
   Microsoft Visual Studio 2005
   Microsoft .NET Framework 2.0
   MSI

Note   The Microsoft software license terms for the standalone executable "Dotnetfx.exe" version 2.0 available for download on the Web do not grant distribution rights. You can obtain a license to distribute Dotnetfx.exe version 2.0 with an application you have developed, via a validly licensed copy of either Microsoft .NET Framework 2.0 Software Development Kit or Microsoft Visual Studio 2005. Requirements and restrictions for distribution of Dotnetfx.exe are described in the license terms for those releases. This article is for informational purposes only and does not grant to you any rights or license to use or distribute the Dotnetfx.exe or any other intellectual property.

Contents

Introduction
Where to Obtain the .NET Framework Redistributable Package
Redistributing the .NET Framework 2.0 Using Visual Studio 2005 Deployment
Installing Localized Versions of .NET Framework 2.0
Minimum Configuration Requirements

Introduction

Microsoft .NET Framework 2.0 includes a redistributable installer that contains the common language runtime and .NET Framework 2.0 components that are necessary to run .NET Framework 2.0 applications. The .NET Framework 2.0 redistributable (see previous note) is available as a stand-alone executable file, "Dotnetfx.exe." 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 2.0 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.

This article covers deployment scenarios for Visual Studio 2005 users.

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.

Where to Obtain the .NET Framework Redistributable Package

You can download Dotnetfx.exe from the SDKs, Redistributables & Service Packs site or you can install it from the Microsoft Windows Update website.

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 is code relating to locale language.

The redistributable is also available on the Microsoft Visual Studio 2005 installation CDs.

If you need to have users install the .NET Framework from the Internet, do not post the .NET Framework Redistributable Package, but instead direct users to the Microsoft Windows Update website.

Redistributing the .NET Framework 2.0 Using Visual Studio 2005 Deployment

This section describes some possible scenarios for distributing the .NET Framework 2.0 redistributable, Dotnetfx.exe, using Visual Studio 2005. Because Dotnetfx.exe is a significant run-time component, you must have administrator privileges in order to install it on a computer. In addition, when you redistribute the .NET Framework 2.0 using Dotnetfx.exe, we recommend that you perform an unattended installation.

Unattended installation

To perform silent installation, type the following at the command prompt:

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

.NET Framework 2.0 Deployment Utilizing Visual Studio 2005

There are three methods for deploying a .NET Framework application:

  • Instruct the user to manually install the .NET Framework executable
  • Use a Visual Studio 2005 Setup Project
  • Redistribute Dotnetfx.exe using Windows Server Update Services (network administrators only). For details, see the Windows Server Update Services website.

When you deploy applications created with Visual Studio 2005 that depend on the .NET Framework 2.0, the .NET Framework 2.0 must already be present on the target computer. The .NET Framework 2.0 can be included in a Windows Installer setup package created using a Visual Studio 2005 Setup Project.

Installing the .NET Framework 2.0 Manually

The .NET Framework redistributable package, Dotnetfx.exe, is a stand-alone executable file that can be run to install the .NET Framework. The redistributable is available from several sources (for details, see Where to Obtain the .NET Framework Redistributable Package); however, you should not assume that users of your application know where to get it or how to install it. For this reason, you should modify your deployment project to provide instructions to the user.

Installers created using the Visual Studio 2005 Setup project that comprise .NET Framework dependent assemblies include a default launch condition .NET Framework (corresponding to the MSI MsiNetAssemblySupport ** property) that checks for the .NET Framework environment on the target computer. If it is not found, installation is halted and a dialog box is displayed (fig. 1).

Aa730867.redistnet2001(en-US,VS.80).gif

Figure 1. Unsatisfied .NET Framework launch condition dialog box

  1. You can change the message in the dialog box. For example, if your application is being distributed by CD-ROM, your message might read: "This setup requires Microsoft .NET Framework 2.0. Please install the .NET Framework 2.0 by running the file Dotnetfx.exe, which can be found in the NetInstall directory on this CD, and then run this setup again."

To customize the launch condition message

  1. In Solution Explorer, select the deployment project.
  2. On the View menu, click Editor, and then click Launch Conditions.
  3. In the Launch Conditions Editor, select the MsiNetAssemblySupport node.
  4. In the Properties window, select Message and replace [VSDNETMSG] with your custom message text.

**Note   **The default message is automatically translated for localized versions of the installer. If you customize the text, you will need to translate it yourself for any localized versions.

The .NET Framework 2.0 requires that MDAC 2.6 or later to be installed for any application that includes data access (version 2.8 SP1 MDAC is recommended). Like the .NET Framework, MDAC package can be installed as a part of a deployment project. Microsoft provides MDAC_typ.exe, a stand-alone executable file that can be run to install MDAC. The MDAC 2.8 SP1 redistributable is available from https://www.microsoft.com/downloads/details.aspx?familyid=78cac895-efc2-4f8e-a9e0-3a1afbd5922e; however, you should not assume that the users of your application know where to get it or how to install it. For this reason, you should modify your deployment project to provide instructions to the user. If your application includes data access, you should also add MDAC 2.8 SP1 as a prerequisite.

To add the MDAC 2.8 SP1 prerequisite

  1. In Solution Explorer, right-click the deployment project and then click Properties.
  2. On the Build page of the <project> Property Pages dialog box, click Prerequisites.
  3. Select Create setup program to install prerequisite components.
  4. In Choose which prerequisites to install, select Microsoft Data Access Components 2.8.
  5. Select one of the options under Specify the install location for prerequisites. You can choose to download from the component's vendor site, from the same location as the application, or from a custom site (for the latter two you must put redistributable component at the desired location by yourself).
  6. Click OK, and then click OK again to close the dialog box.

Installing the .NET Framework 2.0 using the Visual Studio 2005 Setup Project

You can add Microsoft .NET Framework 2.0 to a Visual Studio 2005 setup project as a prerequisite so that the .NET Framework is installed with your application.

To create a setup project and add Microsoft .NET Framework 2.0 as a prerequisite

  1. On the File menu, click New and then click Project.

  2. In the New Project dialog box, expand Other project types and then click Setup and Deployment.

  3. In the templates list, double-click Setup Project.

  4. Add project output, merge modules, files, and assemblies to the project as needed.

  5. In Solution Explorer, right-click the setup project and then click Properties. The Property pages box will appear.

  6. Click Prerequisites and then select Create setup program to install the prerequisite components (Fig. 2).

    Aa730867.redistnet2002(en-US,VS.80).gif

    Figure 2. Prerequisites dialog box

  7. In Choose which prerequisite to install, select .NET Framework 2.0.

  8. In Specify the install location for prerequisites, choose the appropriate option for your application.

    **Note   **You can have users download the .NET Framework from the Microsoft Download Center website or a custom site specified by you. The URL can also point to an offline version of the redistributable file on CD-ROM.

  9. Click OK and then click OK again to close the <project> Property Pages dialog box.

The .NET Framework 2.0 redistributable will be packaged with the Setup.exe for the Setup project when it is built.

Installing Localized Versions of .NET Framework 2.0

Microsoft .NET Framework 2.0 has been localized into many languages. For a complete list of available languages, follow the download links from the MSDN SDKs, Redistributables & Service Packs site and select your language from the drop-down list on the download page. You can also download the localized versions from the Microsoft Windows Update website.

Minimum Configuration Requirements

This section describes the minimum configuration requirements for a computer on which the .NET Framework 2.0 redistributable package is to be installed. If the minimum operating system and software requirements are not met, .NET Framework 2.0 setup will block the installation of the redistributable package. Specifically, note that you cannot install the .NET Framework 2.0 redistributable package on a computer running the Microsoft Windows 98 operating system.

Platform and Software Requirements

Minimum requirements

To install Dotnetfx.exe, you must have one of the following operating systems with Microsoft Internet Explorer 6 SP1 or later installed on your computer:

x32-bit based systems

Microsoft Windows 98
Microsoft Windows ME
Microsoft Windows 2000 Professional with SP4
Windows 2000 Server with SP4
Windows 2000 Advanced Server with SP4
Windows 2000 Datacenter Server with SP4
Microsoft Windows XP Professional with SP2
Windows XP Home Edition with SP2
Windows XP Media Center Edition 2002 with SP2
Windows XP Media Center Edition 2004 with SP2
Windows XP Media Center Edition 2005
Windows XP Tablet PC Edition with SP2
Windows XP Starter Edition
Microsoft Windows Serverâ„¢ 2003 Standard Edition
Windows Server 2003 Enterprise Edition
Windows Server 2003 Datacenter Edition
Windows Server 2003 Web Edition
Windows Server 2003 R2, Standard Edition
Windows Server 2003 R2, Enterprise Edition
Windows Server 2003 R2, Datacenter Edition

x64-bit based systems

Windows XP Professional x64 Edition
Windows Server 2003, Standard x64 Edition
Windows Server 2003, Enterprise x64 Edition
Windows Server 2003, Datacenter x64 Edition
Windows Server 2003 R2, Standard x64 Edition
Windows Server 2003 R2, Enterprise x64 Edition
Windows Server 2003 R2, Datacenter x64 Edition

Itanium-based systems

Windows Server 2003 with SP1, Enterprise Edition for Itanium-based Systems
Windows Server 2003 with SP1, Datacenter Edition for Itanium-based Systems
Windows Server 2003 R2, Enterprise Edition for Itanium-based Systems
Windows Server 2003 R2, Datacenter Edition for Itanium-based Systems

All of the operating systems listed here must also have the latest Windows service pack and critical updates installed. You can install service packs and critical updates from the Microsoft Update website.

Recommended client software

Depending on your application requirements, you might also need to install one or more of the following:

Note   If the recommended software requirements are not met, setup will not block installation or warn you of their absence.

Recommended server software

Depending on your application requirements, you might also need the following server software:

  • MDAC 2.8 SP1 for data on the server, available at the Data Access and Storage Developer Center website.
  • Internet Information Services (IIS) on the server for Windows 2000, Windows XP (Professional), and Windows Server 2003. IIS is required when using ASP.NET applications.

Hardware Requirements

Minimum hardware requirements

CPU Required RAM Required
600 MHz Pentium processor 128 MB

Recommended hardware

CPU Recommended RAM Recommended
800 MHz or faster Pentium processor 256 MB or higher

© Microsoft Corporation. All rights reserved.