Using Visual Studio 2005 to Redistribute the .NET Framework 2.0
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)
Microsoft Visual Studio 2005
Microsoft .NET Framework 2.0
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.
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
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.
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:
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.
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.
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).
Figure 1. Unsatisfied .NET Framework launch condition dialog box
- 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
- In Solution Explorer, select the deployment project.
- On the View menu, click Editor, and then click Launch Conditions.
- In the Launch Conditions Editor, select the MsiNetAssemblySupport node.
- 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 http://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
- In Solution Explorer, right-click the deployment project and then click Properties.
- On the Build page of the <project> Property Pages dialog box, click Prerequisites.
- Select Create setup program to install prerequisite components.
- In Choose which prerequisites to install, select Microsoft Data Access Components 2.8.
- 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).
- 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
- On the File menu, click New and then click Project.
- In the New Project dialog box, expand Other project types and then click Setup and Deployment.
- In the templates list, double-click Setup Project.
- Add project output, merge modules, files, and assemblies to the project as needed.
- In Solution Explorer, right-click the setup project and then click Properties. The Property pages box will appear.
- Click Prerequisites and then select Create setup program to install the prerequisite components (Fig. 2).
Figure 2. Prerequisites dialog box
- In Choose which prerequisite to install, select .NET Framework 2.0.
- 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.
- 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.
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.
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
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
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:
- MDAC 2.6 or later for data access (version 2.8 SP1 is recommended), available from the Data Access and Storage Developer Center website.
- Core WMI for Windows instrumentation, available from the Download Center.
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.
Minimum hardware requirements
|CPU Required||RAM Required|
|600 MHz Pentium processor||128 MB|
|CPU Recommended||RAM Recommended|
|800 MHz or faster Pentium processor||256 MB or higher|