.NET Framework Deployment Guide for Developers
This topic provides information for developers who want to install the .NET Framework 4.5 or the .NET Framework 4.5.1 Preview with their apps.
For download links, see the section Redistributable Packages. You can also download the redistributable packages and language packs from these Microsoft Download Center pages:
Important notes:
-
The .NET Framework 4.5 redistributable was updated on October 9, 2012 to correct an issue related to an improper timestamp on a digital certificate, which caused the digital signature on files produced and signed by Microsoft to expire prematurely. If you previously installed the .NET Framework 4.5 redistributable package dated August 16, 2012, we recommend that you update your copy with the latest redistributable from the Microsoft Download Center. For more information about this issue, see Microsoft Security Advisory 2749655 and Knowledge Base article 2770445.
-
The .NET Framework 4.5 is included in Windows 8 and Windows Server 2012, so you don't have to deploy it with your app on those operating systems. Similarly, the .NET Framework 4.5.1 Preview is included in Windows 8.1 Preview and Windows Server 2012 R2 Preview. For a full list of hardware and software requirements, see .NET Framework System Requirements.
-
You must have administrator privileges to install the .NET Framework 4.5 and its point releases.
-
The .NET Framework 4.5.1 Preview is an in-place update to the .NET Framework 4.5.
-
The .NET Framework 4.5 and its point releases are built incrementally on the .NET Framework 4. When you install the .NET Framework 4.5 or .NET Framework 4.5.1 Preview on a system that has the .NET Framework 4 installed, the version 4 assemblies are replaced with newer versions.
-
Starting with the .NET Framework 4.5, your users can view a list of running .NET Framework apps during setup and close them easily. This may help avoid system restarts caused by .NET Framework installations. See Reducing System Restarts.
-
Uninstalling the .NET Framework 4.5 does not restore .NET Framework 4 files. If you want to go back to the .NET Framework 4, you must reinstall it and any updates to it after uninstalling .NET Framework 4.5.
For information about how a system administrator can deploy the .NET Framework and its system dependencies across a network, see .NET Framework Deployment Guide for Administrators.
When you're ready to publish your app to a web server or other centralized location so that users can install it, you can choose from several deployment methods. Some of these are provided with Visual Studio. The following table lists the deployment options for your app, and specifies the .NET Framework redistributable package that supports each option. In addition to these, you can write a custom setup program for your app; for more information, see the section Chaining the .NET Framework Installation to Your App's Setup.
|
Deployment strategy for your app |
Deployment methods available |
.NET Framework redistributable to use |
|---|---|---|
|
Install from the web |
||
|
Install from disc |
||
|
Install from a local area network (for enterprise apps) |
Either Web bootstrapper (see ClickOnce for restrictions) or Stand-alone redistributable |
The .NET Framework is available in two redistributable packages: web bootstrapper and stand-alone redistributable. The following table compares the two packages.
|
Web bootstrapper |
Stand-alone redistributable |
|
|---|---|---|
|
Download file |
.NET Framework 4.5.1 Preview:
.NET Framework 4.5: |
.NET Framework 4.5.1 Preview:
.NET Framework 4.5: |
|
Internet connection required? |
Yes |
No |
|
Size of download |
Smaller (includes installer for target platform only)* |
Larger (includes all installers)* |
|
Language packs |
Included** |
Must be installed separately |
|
Deployment method |
Supports all methods: |
Supports all methods: |
|
Location of download for ClickOnce deployment |
Microsoft Download Center: |
Your own server or the Microsoft Download Center: |
* The stand-alone redistributable is larger because it contains the installers for all the target platforms. When you finish running setup, the Windows operating system caches only the installer that was used. If the stand-alone executable is deleted after the installation, the disk space used is the same as that used by the web bootstrapper. If the tool you use (for example, InstallShield) to create your app's setup program provides a setup file folder that is removed after installation, the stand-alone package can be automatically deleted by placing it into the setup folder.
** If you're using the web bootstrapper with custom setup, you can use default language settings based on the user's Multilingual User Interface (MUI) setting, or specify another language pack by using the /LCID option on the command line. See the section Chaining by Using the Default .NET Framework UI for examples.
Three deployment methods are available:
-
You can set a dependency on the .NET Framework. You can specify the .NET Framework as a prerequisite in your app's installation, using one of these methods:
-
Use ClickOnce deployment (available with Visual Studio)
-
Create an InstallShield project (available with Visual Studio)
-
-
You can ask your users to install the .NET Framework manually.
-
You can chain (include) the .NET Framework setup process in your app's setup, and decide how you want to handle the .NET Framework installation experience:
-
Use the default UI. Let the .NET Framework installer provide the installation experience.
-
Customize the UI to present a unified installation experience and to monitor the .NET Framework installation progress.
-
These deployment methods are discussed in detail in the following sections.
If you use ClickOnce, InstallShield, or WiX to deploy your app, you can add a dependency on the .NET Framework so it can be installed as part of your app.
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, to choose ClickOnce deployment and add a dependency on the .NET Framework:
-
Open the app project you want to publish.
-
In Solution Explorer, open the shortcut menu for your project, and then choose Properties.
-
Choose the Publish pane.
-
Choose 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 and select the .NET Framework 4.5.
-
Choose an option to specify the source location for the prerequisites, and then choose OK.
If you supply a URL for the .NET Framework 4.5 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 disc on which your own app is being distributed.
-
In the Property Pages dialog box, choose OK.
In Visual Studio, to choose InstallShield deployment and add a dependency on the .NET Framework:
-
On the Visual Studio menu bar, choose File, New, Project.
-
In the left pane of the New Project dialog box, choose Other Project Types, Setup and Deployment, InstallShield LE.
-
In the Name box, type a name for your project, and then choose 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 2012.
-
Go to Project Assistant wizard and choose Application Files to add the Project Output. You can configure other project attributes by using this wizard.
-
Go to Installation Requirements and select the operating systems and the version of the .NET Framework you want to install.
-
Open the shortcut menu for your setup project and choose Build.
The Windows Installer XML (WiX) toolset builds Windows installation packages from XML source code. WiX supports a command-line environment that can be integrated into your build processes to build MSI and MSM setup packages. By using WiX, you can specify the .NET Framework as a prerequisite, or create a chainer to fully control the .NET Framework deployment experience. For more information about WiX, see the Windows Installer XML (WiX) toolset website.
In some situations, it might be impractical to automatically install the .NET Framework with your app. In that case, you can have users install the .NET Framework themselves. The redistributable package is available in two packages. In your setup process, provide instructions for how users should locate and install the .NET Framework.
If you're creating a custom setup program for your app, you can chain (include) the .NET Framework setup process in your app's setup process. Chaining provides two UI options for the .NET Framework installation:
-
Use the default UI provided by the .NET Framework installer.
-
Create a custom UI for the .NET Framework installation for consistency with your app's setup program.
Both methods allow you to use either the web bootstrapper or the stand-alone redistributable. Each package has its advantages:
-
If you use the web bootstrapper, the .NET Framework setup process will decide which installation package is required, and download and install only that package from the web.
-
If you use the stand-alone redistributable, you can include the complete set of .NET Framework installation packages with your redistribution media so that your users don't have to download any additional files from the web during setup.
To silently chain the .NET Framework installation process and let the .NET Framework installer provide the UI, add the following command to your setup program:
<.NET Framework redistributable> /q /norestart /ChainingPackage <PackageName>
For example, if your executable program is Contoso.exe and you want to silently install the .NET Framework 4.5 stand-alone redistributable package, use the command:
dotNetFx45_Full_x86_x64.exe /q /norestart /ChainingPackage Contoso
You can use additional command-line options to customize the installation. For example:
To provide a way for users to close running .NET Framework apps to minimize system restarts, set passive mode and use the /showrmui option as follows:
dotNetFx45_Full_x86_x64.exe /norestart /passive /showrmui /ChainingPackage Contoso
This command allows Restart Manager to display a message box that gives users the opportunity to close .NET Framework apps before installing the .NET Framework 4.5.
If you're using the web bootstrapper, you can use the /LCID option to specify a language pack. For example, to chain the .NET Framework 4.5 web bootstrapper to your Contoso setup program and install the Japanese language pack, add the following command to your app's setup process:
dotNetFx45_Full_setup.exe /q /norestart /ChainingPackage Contoso /LCID 1041
If you omit the /LCID option, setup will install the language pack that matches the user's MUI setting.
NoteDifferent language packs may have different release dates. If the language pack you specify is not available at the download center, setup will install the .NET Framework without the language pack. If the .NET Framework is already installed on the user’s computer, the setup will install only the language pack.
For a complete list of options, see the Command-Line Options section.
For common return codes, see the Return Codes section.
If you have a custom setup package, you may want to silently launch and track the .NET Framework setup while showing your own view of the setup progress. If this is the case, make sure that your code covers the following:
-
Check for .NET Framework hardware and software requirements.
-
Detect whether the correct version of the .NET Framework is already installed on the user’s computer.
-
Detect whether the language packs are already installed on the user’s computer.
-
If you want to control the deployment, silently launch and track the .NET Framework setup process (see How to: Get Progress from the .NET Framework 4.5 Installer).
-
If you’re deploying the stand-alone redistributable, chain the language packs separately.
-
Customize deployment by using command-line options. For example, if you’re chaining the .NET Framework web bootstrapper, but you want to override the default language pack, use the /LCID option, as described in the previous section.
The .NET Framework installer writes registry keys when installation is successful. You can test whether the .NET Framework 4.5 or later is installed by checking the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full folder in the registry for a DWORD value named Release. (Note that the ".NET Framework Setup" folder doesn't begin with a period.) The existence of this key indicates that the .NET Framework 4.5 or later version has been installed on that computer. The value of Release indicates which version of the .NET Framework is installed.
|
Version |
Value of the Release DWORD |
|---|---|
|
.NET Framework 4.5.1 Preview |
378575 |
|
.NET Framework 4.5 |
378389 |
You can test whether a specific language pack is installed by checking the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\LCID folder in the registry for a DWORD value named Release. LCID specifies a locale identifier; see supported languages for a list of these.
For example, to detect whether the full Japanese language pack (LCID=1041) is installed, check for the following values in the registry:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\1041 Name: Release Type: DWORD
For the .NET Framework 4.5, to determine whether the final released version of the language pack has been installed, check for a value that is greater than 378181.
The .NET Framework provides a set of stand-alone language pack executable files that contain localized resources for specific cultures. The language packs for the .NET Framework 4.5 are available from the Microsoft Download Center. These .exe files do not contain the language-neutral binaries that are required to install the .NET Framework 4.5 language packs. For the .NET Framework 4.5, the package names take the form dotNetFx45LP_Full_x86_x64<culture>.exe, where culture specifies a supported language. An example of one of these packages is dotNetFx45LP_Full_x86_x64ja.exe.
To install a language pack with the .NET Framework stand-alone redistributable package, you must chain it to your app's setup. For example, to deploy the .NET Framework 4.5 stand-alone redistributable with the Japanese language pack, use the following command:
dotNetFx45LP_Full_x86_x64ja.exe /q /norestart /ChainingPackage <ProductName>
You do not have to chain the language packs if you use the web bootstrapper; setup will install the language pack that matches the user's MUI setting. If you want to install a different language, you can use the /LCID option to specify a language pack.
For a complete list of command-line options, see the Command-Line Options section.
The following table lists the most common return codes for the .NET Framework redistributable installer. The return codes are the same for all versions of the installer. For links to detailed information, see the next section.
|
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. |
You can uninstall the .NET Framework 4.5 by using Add or Remove Programs in Control Panel.
The .NET Framework 4.5 is a replacement for the .NET Framework 4. When you install the .NET Framework 4.5 on a system that has the .NET Framework 4 installed, the assemblies are replaced.
Important
|
|---|
|
Uninstalling the .NET Framework 4.5 does not restore the .NET Framework 4 files. If you want to go back to the .NET Framework 4, you must reinstall it and any updates to it. |
The following table lists options that you can include when you chain the .NET Framework 4.5 redistributable to your app's setup.
|
Option |
Description |
||
|---|---|---|---|
|
/CEIPConsent |
Overwrites the default behavior and sends anonymous feedback to Microsoft to improve future deployment experiences. This option can be used only if the 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 "Lucerne Publishing". For an example of a chaining package, see Getting Progress Information from an Installation Package in the MSDN Library. |
||
|
/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.
|
||
|
/log file | folder |
Specifies the location of the log file. The default is the temporary folder for the process, and the default file name is based on the package. If the file extension is .txt, a text log is produced. If you specify any other extension, an HTML log is created. |
||
|
/msioptions |
Specifies options to be passed for .msi and .msp items; for example: /msioptions "PROPERTY1='Value'". |
||
|
/norestart |
Prevents the setup program from rebooting automatically. If you use this option, the chaining app has to capture the return code and handle rebooting (see Getting Progress Information from an Installation Package in the MSDN Library). |
||
|
/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, when chained by a setup program, the chaining package must handle return codes. |
||
|
/pipe |
Creates a communication channel to enable a chaining package to get progress. |
||
|
/promptrestart |
Passive mode only, if the setup program requires a restart, it prompts the user. This option requires user interaction if a restart is required. |
||
|
/q |
Sets quiet mode. |
||
|
/repair |
Triggers the repair functionality. |
||
|
/serialdownload |
Forces the installation to happen only after the entire redistributable has been downloaded. |
||
|
/showfinalerror |
Sets passive mode. Displays errors only if the installation is not successful. This option requires user interaction if the installation is not successful. |
||
|
/showrmui |
Used only with the /passive option. Displays a message box that prompts users to close .NET Framework apps that are currently running. This message box behaves the same in passive and non-passive mode. |
||
|
/uninstall |
Uninstalls the .NET Framework redistributable. |
The table below lists .NET Framework language packs that are available for the .NET Framework 4.5 and the .NET Framework 4.5.1 Preview.
|
LCID |
Language – country/region |
Culture |
|---|---|---|
|
1025 |
Arabic - Saudi Arabia |
ar |
|
1028 |
Chinese – Traditional |
zh-Hant |
|
1029 |
Czech |
cs |
|
1030 |
Danish |
da |
|
1031 |
German – Germany |
de |
|
1032 |
Greek |
el |
|
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 – Simplified |
zh-Hans |
|
2070 |
Portuguese – Portugal |
pt-PT |
|
3082 |
Spanish - Spain (Modern Sort) |
es |
Important