.NET Framework Deployment Guide for Developers
Updated: July 2011
This topic provides information for developers who want to install .NET Framework version 4 with their applications.
You can download the .NET Framework 4 stand-alone redistributable package and the .NET Framework 4 language packs from the Microsoft Download Center. For download links, see the sections Standalone Redistributable Packages and Web Bootstrapper Packages.
This topic contains the following sections:
Installation Requirements
Standalone Redistributable Packages
Web Bootstrapper Packages
Redistributing the .NET Framework 4 Using Visual Studio 2010
Installing the .NET Framework Manually
Chaining the Redistributable Package to Your Application Setup
Chaining the Language Packs to Your Application Setup
Detecting the .NET Framework 4
Detecting the Language Packs
Uninstalling Microsoft .NET Framework 4
Command-Line Options
Troubleshooting
For information about how a system administrator can deploy the .NET Framework 4 and its system dependencies across a network, see the .NET Framework Deployment Guide for Administrators.
Installation Requirements
The following is a summary of the software and hardware requirements for installing the .NET Framework 4. For a detailed description of the requirements, see .NET Framework System Requirements.
Note
You must have administrator privileges to install the .NET Framework 4.
Software Requirements
To install the .NET Framework 4, one of the following operating systems must be installed on the target computer:
Windows 7 family.
Windows Server 2008 R2 family.
Windows Server 2008 Server Core R2 with Service Pack 1 or later.
Windows Vista family.
Windows Server 2008 family.
Windows XP Home or Microsoft Windows XP Professional, both with Service Pack 3 or later.
Windows Server 2003 family with Service Pack 2 or later.
For Windows Server 2003, you must also install Windows Imaging Component (WIC) on the target computer:
For Windows Server 2008 R2 Server Core, you must turn on the following operating system features:
.NET Framework 2.0. Use one of the following ocsetup commands:
start /w ocsetup NetFx2-ServerCore
start /w ocsetup NetFx2-ServerCore-WOW64
Windows 32-bit on Windows 64-bit (WOW64). Use the following ocsetup command:
- start /w ocsetup ServerCore-WOW64
Hardware Requirements
Requirement |
Recommended minimum |
---|---|
CPU |
Pentium 1 GHz or higher |
RAM |
512 MB or more |
Disk space for Client Profile |
32-bit system: 600 MB 64-bit system: 1.5 GB |
Disk space for Full Profile |
32-bit system: 850 MB 64-bit system: 2 GB |
Stand-Alone Redistributable Packages
The stand-alone redistributable packages contain all the components that are required to deploy the .NET Framework 4 on the specified target platforms. However, these executables do not contain language packs. You can use the stand-alone language packs to install language support.
The following table lists the stand-alone redistributable packages for each profile and platform.
Stand-alone package |
EXE name |
Profile |
Target platforms |
---|---|---|---|
.NET Framework 4 for x86 and x64 |
Full |
x86 and x64 |
|
.NET Framework 4 for IA-64 |
Full |
x86 and IA-64 |
|
.NET Framework 4 for x86 |
Full |
x86 only |
|
.NET Framework 4 Client Profile for x86 and x64 |
Client |
x86 and x64 |
|
.NET Framework 4 Client Profile for x86 |
Client |
x86 only |
|
.NET Framework 4 for Server Core (can be used only on Windows Server 2008 Server Core R2 operating systems) |
Full |
x64 Server Core |
The dotNetFx40_Full_x86_64.exe and dotNetFx40_Client_x86_64.exe packages are designed for both x86 and x64 computers. These are the recommended packages for most deployment scenarios. However, these packages do not support IA-64-based computers.
Use the dotNetFx40_Full_x86.exe or dotNetFx40_Client_x86.exe package if you plan to install the .NET Framework 4 only on x86 computers. Do not use these packages for installation on 64-bit operating systems. (The Client Profile package is not available for redistribution on IA-64-based computers.)
Web Bootstrapper Packages
The Web bootstrapper packages are Web-based installers that simplify the installation process. These lightweight files download the required components from the Web during setup. Each package requires an Internet connection and detects, downloads, and installs required components and the language pack that matches the language of the user’s operating system. You can use the stand-alone language packs to install additional language support.
Note
Web bootstrapper packages do not work on Windows Server 2008 Server Core R2 computers.
The following table lists the Web bootstrapper packages for each profile.
Bootstrapper package |
EXE name |
Profile |
Target platforms |
---|---|---|---|
.NET Framework 4 |
Full |
All CPUs |
|
.NET Framework 4 Client Profile |
Client |
x86 and x64 |
Using the Web bootstrapper, you can manually launch and install the redistributable package on a computer. The redistributable can also be launched and installed as part of the setup program for a .NET Framework 4 application.
Redistributing the .NET Framework 4 Using Visual Studio 2010
When you deploy applications that are created with Microsoft Visual Studio 2010 and that require the .NET Framework 4, the .NET Framework must be installed on the target computer before your application is installed. You can include the .NET Framework 4 in a setup executable file that you create by using a Visual Studio 2010 setup project. You can do this in three ways: by using a Visual Studio setup project, ClickOnce application deployment, or InstallShield project.
If you create a setup program for the .NET Framework, you can optionally chain it to your application's setup process, to monitor the installation of the .NET Framework. This is discussed in the section Chaining the .NET Framework to Your Application Setup. You can also chain the .NET Framework language packs, unless you are using the Web bootstrapper. This is discussed in the section Chaining the Language Packs to Your Application Setup.
If creating a setup file is not practical, you can have users install the .NET Framework manually, as described in the next section.
Note
For information about installing the .NET Framework 4 on Server Core computers, see the Chaining the Language Packs to Your Application Setup section.
To include the .NET Framework with a setup project
When you configure a Visual Studio 2010 setup project to install the .NET Framework 4 with your application, the .NET Framework 4 is packaged with your application. Your application's setup checks whether the .NET Framework 4 is installed, and, if necessary, installs it before installing your application.
In Visual Studio 2010, create a new setup project by following these steps:
In the File menu, click New, and then click Project.
In the left pane, click Other Project Types, click Setup and Deployment, and then click Visual Studio Installer.
In the Name box, type a name for your project, and then click OK.
In Solution Explorer, right-click the setup project name, click Add, and then add your project output, merge modules, files, and assemblies.
In Solution Explorer, right-click the setup project name, and then click Properties.
In the Property Pages dialog box, click Prerequisites.
In the Prerequisites dialog box, make sure that the Create setup program to install prerequisite components check box is selected.
In the prerequisites list, locate the .NET Framework 4, and then select the desired profile (.NET Framework 4 or .NET Framework 4 Client Profile).
Click an option to specify the source location for the prerequisites, and then click OK.
If you supply a URL for the .NET Framework 4 download location, you can specify either the Microsoft Download Center site or a site of your own. If you are placing the redistributable package on your own server, it must be the full redistributable and not the Web bootstrapper. You can only link to the Web bootstrapper on the Microsoft Download Center. The URL can also specify a CD on which your own application is being distributed.
In the Property Pages dialog box, click OK.
To include the .NET Framework with ClickOnce deployment
ClickOnce deployment lets you publish Windows-based applications to a Web server or network file share for simplified installation. Visual Studio provides full support for publishing and updating applications that are deployed with ClickOnce. ClickOnce deployment is available for projects that are created with Visual Basic and Visual C#, but it is not available for Visual C++.
In Visual Studio 2010, choose ClickOnce deployment by following these steps:
Open the application project you want to publish.
In Solution Explorer, right-click your project name, and then click Properties.
Click the Publish pane.
Click the Prerequisites button.
In the Prerequisites dialog box, make sure that the Create setup program to install prerequisite components check box is selected.
In the prerequisites list, locate the .NET Framework 4, and then select the desired profile (.NET Framework 4 or .NET Framework 4 Client Profile).
Click an option to specify the source location for the prerequisites, and then click OK.
If you supply a URL for the .NET Framework 4 download location, you can specify either the Microsoft Download Center site or a site of your own. If you are placing the redistributable install package on your own server, it must be the full redistributable and not the Web bootstrapper. You can only link to the Web bootstrapper on the Microsoft Download Center. The URL can also specify a CD on which your own application is being distributed.
In the Property Pages dialog box, click OK.
To include the .NET Framework with InstallShield
InstallShield allows you to publish Windows-based applications through Visual Studio 2010.
In Visual Studio 2010, create a new setup project by following these steps:
In the File menu, click New, and then click Project.
In the left pane, click Other Project Types, click Setup and Deployment, and then click InstallShield 2010.
In the Name box, type a name for your project, and then click OK.
If you are a first-time user, click Go to InstallShield to download InstallShield Limited Edition for Microsoft Visual Studio 2010. Restart Visual Studio 2010.
Go to Project Assistant wizard and click Application Files to add the Project Output. Through Project Assistant, you can configure other project attributes.
Go to Installation Requirements and select the operating systems and the version of the .NET Framework you want to install.
Right-click your setup project and click Build.
Installing the .NET Framework Manually
In some situations, it might be impractical to automatically install the .NET Framework 4 with your application. In that case, you can have users install the .NET Framework themselves. The redistributable package is available in multiple configurations (see the sections Standalone Redistributable Packages and Web Bootstrapper Packages earlier in this topic). In your setup process, provide instructions for how users should locate and install the .NET Framework.
Chaining the .NET Framework to Your Application Setup
The .NET Framework 4 provides two ways for you to use command-line commands to include (chain) the .NET Framework setup process in your application's setup process:
Include the complete set of .NET Framework files with your redistribution media so that users do not have to download any additional files from the Web during setup.
Let the .NET Framework setup process decide which components are required, and download and install only the required components from the Web using the Web bootstrapper packages.
These two options are discussed in the next two sections.
Regardless of which option you choose, to chain the .NET Framework 4 installation process, run the redistributable from the command line, use the following installation command-line options after the redistributable .exe name, and process the error codes accordingly:
<.NET Framework redistributable> /q /norestart /ChainingPackage <packageName>
Note
The examples in this topic assume that the chaining package name is MyProductName.
For a complete list of options, see the Command-Line Options section.
For an example of a chaining package, see How to: Get Progress from the .NET Framework 4 Installer.
Including the .NET Framework Files with Your Redistribution Media
If you want to include all the components in the .NET Framework setup process, use the stand-alone redistributable packages. These packages include components that are required to install the .NET Framework 4 on x86, x64, and IA-64 computers on supported operating systems. For example, to chain the .NET Framework Client Profile setup process on x86 or x64 computers by using the stand-alone redistributable package, use the following command:
dotNetFx40_Client_x86_x64.exe /q /norestart /ChainingPackage "MyProductName"
Note
This method does not chain-install the language packs. (See the section Chaining the Language Packs to your Application Setup.)
Letting the .NET Framework Setup Process Decide
This option uses the Web bootstrapper packages to install only required components. You can use Web bootstrapper deployment with default language settings or specify another language pack by using the /LCID command-line option.
Using default language settings
If you do not specify the /LCID command-line option, the Web bootstrapper automatically downloads the language pack that matches the user’s Multilingual User Interface (MUI) setting. For example, to chain the full .NET Framework setup process on x86 or x64 computers by using the Web bootstrapper package, add the following command to your application's setup process:
dotNetFx40_Full_setup.exe /q /norestart /ChainingPackage "MyProductName"
With this option, the language pack that matches the user's MUI setting is automatically downloaded and installed.
Overriding default language settings
If you specify the /LCID command-line option, the Web bootstrapper does not perform automatic detection; it downloads the language pack that you specify. For example, to chain the full .NET Framework setup process on x86 or x64 computers and install the Japanese language pack, add the following command to your application's setup process:
dotNetFx40_Full_setup.exe /q /norestart /ChainingPackage "MyProductName" /LCID 1041
Note
Different language packs may have different release dates. If the specified language pack is not available at the download center, setup will install the .NET Framework without the language pack. Also, if the .NET Framework 4 is already installed on the user’s computer, the Web bootstrapper will install only the language pack.
Tracking and Canceling a Silent Installation in Application Setup
The .NET Framework 4 setup may often be included as a prerequisite component in the setup of applications. To present a customized or unified setup experience for applications that require the .NET Framework 4, you may want to silently launch and track the .NET Framework 4 setup while showing your own view of the setup progress. To enable this, see How to: Get Progress from the .NET Framework 4 Installer in the MSDN Library.
Chaining the Language Packs to Your Application Setup
The following table provides a list of stand-alone language pack executable files that contain the localized resources for the specified target platforms. These executables do not contain the language-neutral binaries that are required to install the .NET Framework 4 language packs. culture specifies a supported language.
You do not need to chain the language packs if you use the Web bootstrapper.
Package name |
Profile |
Target platforms |
---|---|---|
dotNetFx40LP_Full_x86_x64culture.exe |
Full |
x86 and x64 |
dotNetFx40LP_Full_x86_ia64culture.exe |
Full |
x86 and IA-64 |
dotNetFx40LP_Full_x86culture.exe |
Full |
x86 only |
dotNetFx40LP_Client_x86_x64culture.exe |
Client |
x86 and x64 |
dotNetFx40LP_Client_x86culture.exe |
Client |
x86 only |
dotNetFx40LP_Full_x86_x64culture_SC.exe (can be used only on Windows Server 2008 Server Core R2 operating systems) |
Full |
x64 Server Core |
Note
The Client Profile language packs are not available for redistribution on IA-64-based computers.
Some examples of these packages are dotNetFx40LP_Full_x86_x64de.exe and dotNetFx40LP_Full_x86_x64ja.exe.
For example, to deploy the full .NET Framework 4 with the German language pack on x86 or x64 computers, use the following command:
dotNetFx40LP_Full_x86_x64de.exe /q /norestart /ChainingPackage "MyProductName"
For a complete list of command-line options, see the Command-Line Options section.
Detecting the .NET Framework 4
The .NET Framework 4 installer writes registry keys when installation is successful. You can test whether the .NET Framework 4 is installed by checking the registry keys listed in the following table.
Profile |
Registry key name |
Value |
---|---|---|
Full |
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full |
Name: Install Type: DWORD Data: 1 |
Client |
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client |
Name: Install Type: DWORD Data: 1 |
Detecting the Language Packs
You can test whether a specific language pack is installed by checking the registry keys listed in the following table. LCID specifies a locale identifier; see supported languages for a list of these.
Profile |
Registry Key Name |
Value |
---|---|---|
Full |
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\LCID |
Name: Install Type: DWORD Data: 1 |
Client |
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client\LCID |
Name: Install Type: DWORD Data: 1 |
For example, to detect whether the full Japanese language pack is already installed, check for the following values in the registry:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\1041
Name: Install
Type: DWORD
Data: 1
Uninstalling the .NET Framework 4
You can uninstall the .NET Framework 4 by using Add or Remove Programs in Control Panel. You must first uninstall the .NET Framework 4 Extended version before you can uninstall the .NET Framework 4 Client Profile.
For Server Core operating systems, you must uninstall the .NET Framework 4 by using the following command-line operations:
Uninstall the .NET Framework 4 Extended version:
%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Extended\setup.exe /uninstall /x86 /x64 /ia64 /parameterfolder Extended /q
Uninstall the .NET Framework 4 Client Profile:
%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client
Command-Line Options
The following table lists options that you can include when you run the .NET Framework 4 redistributable installation program from the command line.
Option |
Description |
---|---|
/q |
Sets quiet mode. |
/norestart |
Prevents the Setup program from rebooting automatically. If you use this option, the chaining application has to capture the return code and handle rebooting (see Tracking.NET Framework 4). |
/repair |
Triggers the repair functionality |
/LCID LCID where LCID specifies a locale identifier (see supported languages) |
Installs the language pack specified by LCID and forces the displayed UI to be shown in that language (unless quiet mode is set). For the Web bootstrapper, this option chain-installs the language package from the Web. Note Do not use this option when you install the .NET Framework language packs. |
/passive |
Sets passive mode; displays the progress bar to indicate that installation is in progress, but does not display any prompts or error messages to the user. In this mode, the Setup program must handle return codes. |
/showfinalerror |
Sets passive mode, but displays errors if the installation is not successful. This option requires user interaction if the installation is not successful. |
/promptrestart |
In passive mode, if the setup program requires a reboot to complete, it prompts the user. This option requires user interaction if a reboot is required. |
/CEIPConsent |
Overwrites the default behavior and sends anonymous feedback to Microsoft to improve future deployment experiences. This option can be used only if the application Setup program prompts for consent and if the user grants permission to send anonymous feedback to Microsoft. |
/chainingpackage PackageName |
Specifies the name of the executable that is doing the chaining. This information is sent to Microsoft as anonymous feedback to help improve future deployment experiences. If the package name includes spaces, use double quotation marks as delimiters; for example: /chainingpackage "Chaining Product". For an example of a chaining package, see Getting Progress Information from an Installation Package in the MSDN Library. |
Supported Languages
LCID |
Language – country/region |
Culture |
---|---|---|
1025 |
Arabic - Saudi Arabia |
ar |
1028 |
Chinese - Taiwan |
zh-cht |
1029 |
Czech |
cs |
1030 |
Danish |
da |
1031 |
German - Germany |
de |
1032 |
Greek |
el |
1033 |
English - United States |
Not available |
1035 |
Finnish |
fi |
1036 |
French - France |
fr |
1037 |
Hebrew |
he |
1038 |
Hungarian |
hu |
1040 |
Italian - Italy |
it |
1041 |
Japanese |
ja |
1042 |
Korean |
ko |
1043 |
Dutch - Netherlands |
nl |
1044 |
Norwegian (Bokmål) |
no |
1045 |
Polish |
pl |
1046 |
Portuguese - Brazil |
pt-BR |
1049 |
Russian |
ru |
1053 |
Swedish |
sv |
1055 |
Turkish |
tr |
2052 |
Chinese - People's Republic of China |
zh-chs |
2070 |
Portuguese - Portugal |
pt-PT |
3082 |
Spanish - Spain (Modern Sort) |
es |
Troubleshooting
Return Codes
The following table lists the most common return codes for the .NET Framework 4 redistributable installation program. The return codes are the same for all versions of the installer. For detailed information, see the next section, "Download Error Codes".
Return code |
Description |
---|---|
0 |
Installation completed successfully. |
1602 |
The user canceled installation. |
1603 |
A fatal error occurred during installation. |
1641 |
A restart is required to complete the installation. This message indicates success. |
3010 |
A restart is required to complete the installation. This message indicates success. |
5100 |
The user's computer does not meet system requirements. |
5101 |
Internal state failure. |
Download Error Codes
Other error codes:
See Also
Concepts
.NET Framework Deployment Guide for Administrators
Change History
Date |
History |
Reason |
---|---|---|
July 2011 |
Corrected the return code for restart required.. |
Customer feedback. |
March 2011 |
Added information about Windows Server 2008 Server Core. |
Information enhancement. |