Introducing the Microsoft .NET Framework Repair Tool
The .NET Setup team has made some significant investments over the last couple of years in improving the deployment experience for the .NET Framework setup and its updates. In spite of this effort, occasionally some customers run into issues deploying the .NET Framework or its updates that cannot be fixed from within the setup itself. For such cases, we have a tool – the .NET Framework Repair Tool that can help with detecting and fixing some of these common causes of install failures.
We are happy to announce a new version of the tool that encompasses support for all versions of the .NET Framework from 3.5 SP1 to 4.5.1. This update includes the support for running the tool in unattended modes (quiet/passive) and some additional fixes for new scenarios that were not previously included.
How to obtain the latest version of the Microsoft .NET Framework Repair Tool?
The tool is available for download from the Microsoft Download Center.
For more information about the fixes and options in this revision of the tool, see the Knowledge Base Article KB2698555.
Features in this release:
Key features included in this release of .NET Repair Tool:
- Support for .NET Framework 4.5 and .NET Framework 4.5.1.
- You can run the tool in Quiet or Passive modes via the command line. This enables automation of the repair task if needed, or using the tool in larger enterprise-wide deployments.
- You can either target specific .NET Framework versions to fix or all versions. The first option is going to run much faster than the second.
- A “Log Collection Only” mode was added that allows collection of the logs relevant to .NET Framework setup. This is useful for troubleshooting and root causing the issue before any fixes/changes are applied to the machine.
- The tool supports an Offline Repair mode so this can be used in an offline/locked down environment.
Using the tool:
The tool can be run in two ways:
- In full UI mode, wherein the wizard will guide you through the various steps for scanning and fixing issues.
- In Quiet/Passive Mode using command line switches. You will most likely use this option if you want to automate the process of running the tool for applying fixes, collecting logs, repairing specific versions, etc. A common usage may be like:
NetFxRepairTool.exe /q /l “%temp%”
This will run the tool in quiet mode, apply fixes/repairs for supported .NET Framework versions (excluding in box versions), collect logs in %temp% folder and send usage data to Microsoft.
The .NET Framework Repair Tool performs the following key functions:
- Scans the system for common/known causes of setup failures that can severely impact installation of .NET Framework and its updates. At the end of the scan, the tool displays a list of the recommended fixes that may be applied.
- The tool may make one or more changes to the computer such as correcting the state of the Windows Installer service on the computer, reset the discretionary access control lists (DACLs) on certain folders, or resolve issues that are related to an invalid or corrupted update registration. In all cases, even when the tool cannot find any specific issue, it recommends reregistering and restarting of the Windows Installer service.
- After the fixes are applied, the user is given an opportunity to check if the issues have been resolved or not. If a particular issue is still not resolved, the user is provided with an option to run a full Repair of the supported .NET Framework versions.
- At the end of the tool run, the user is given an option to create a .cab file containing the installation logs and send this to Microsoft for further analysis.
Note: This tool is constantly updated with new fixes as and when new issues are identified, so we do not recommend redistributing this tool with an app.
Let’s take an example where the .NET Framework Repair tool can be pretty helpful. Assume that we have .NET Framework 4.0 Client Profile installed on a computer and the installation got corrupted due to deleted installation files from both Windows Installer cache ([%windirInstaller]) as well as from .NET setup’s own cache ([%windir%Microsoft.NETFramework64v4.0.30319SetupCacheClient]). In that case, when we try to repair the product from the “Programs and Features” Control Panel applet, we will get the following screen:
When we repair the product, we get the following error:
What this means is that we cannot repair the .NET Framework because the required Windows Installer database (MSI) is missing. Another obvious thing would be to try downloading and installing the .NETFramework 4.0 Client again. However, it would result in the same error. Here is what we find in the log file:
MSI (s) (78:68) [17:58:26:798]: Machine policy value ‘DisableUserInstalls’ is 0
MSI (s) (78:68) [17:58:26:799]: Warning: Local cached package ‘C:WINDOWSInstallerf79cee8.msi’ is missing.
MSI (c) (E8:50) [10:36:33:200]: MainEngineThread is returning 1612
The return code 1612 translates to the message ”The installation source for this product is not available. Verify that the source exists and that you can access it.”, reflecting the fact that the product MSI is missing from the Windows Installer cache and Setup cache locations.
This is where the .NET Framework Repair tool can come in handy. It will take care of the repair and make all the necessary changes to the machine and restore .NET Framework to a healthy state. This is how the “Additional repair options” step looks like in this scenario:
When we hit ‘Next’, the tool does the job and shows the result of a successful repair:
This is just one example of many issues the .NET Framework Repair tool can fix.
We don’t intend to stop here, we plan to make continuous improvements to the overall setup experience – the product setup, it’s updates, as well as this Repair tool. If you discover setup issues not currently addressed by this tool or have any other suggestions feel free to send us a note at firstname.lastname@example.org.