Introducing the Microsoft .NET Framework Repair Tool

Introducing the Microsoft .NET Framework Repair Tool

Rate This
  • Comments 16

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:

  1. Support for .NET Framework 4.5 and .NET Framework 4.5.1.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Example:

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 ([%windir\Installer]) as well as from .NET setup’s own cache ([%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client]). 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:\WINDOWS\Installer\f79cee8.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.

Conclusion:

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 netfxsetup@microsoft.com.

 

Leave a Comment
  • Please add 2 and 7 and type the answer here:
  • Post
  • What does "excluding in box versions" mean?

  • This is awesome; I don't need it at the moment, but this is the kind of tool that really jazzes (which is even better than really rocking)!

  • @Matt

    Microsoft .NET Framework Repair Tool is specific for MSI-based versions of the .NET Framework, something like for .NET 4 or .NET 4.5.1 on Windows 7.  It does not apply to versions of the .NET Framework that are installed as a part of Windows, like .NET 3.5 or .NET 4.5.1 on Windows 8.1.

  • This really needs to be expanded to support in box (distributed with windows) versions; it needs to be possible to repair the built in versions. They can and do become damaged, and sfc is ridiculously unfriendly for end users.

    (and the windows 8 reimage/refresh kills desktop apps.  That ticks off users.  Alot.  Needs to be a good way to repair the framework versions bundled with the is - or as Raymond Chen likes to say, Windows is not a .net distribution channel.  So I'd really like to see this as a separate MSI that Windows installs in the normal way... Also MSI supports Internet - why not include the web as a backup source?)

  • Please reduce the installation times of VS and .NET Framework! Why can't you guys take something like adaptive snapshot approach. Where the setup analyze system and current registry state, make a package and then just deploy it. Its like millions of nested loops working to install the dam thing on a system. Please feel the pain!

  • I thought the in-box versions are expected to be fixed by SFC command. Am I right?

    Just that SFC won't fix the config-file problems. Seems we need a schema checker for this.

  • Your blog is so much attractive as you described detailed information about  .NET Framework Repair Tool that helps in detecting and fixing some of these common causes of install failures.I like your content as you described it in step by step process with proper diagram. I came to know about a company that is ASP.NET Hosting which also provides free hosting with features of .NET Framework Repair Tool.

    Visit : http://www.myasp.net

  • This is much welcomed.  I've been through this modern day 'dll hell'/registry hell with MS SQL Server 2008 r2 where it failed during an installation, uninstal failed and there was no way to force all of the registry changes and other files to be removed from the system.  This resulted in more than one day spent rebuilding a development machine from a clean hard disk (VS 2008, 2010, 2012, Win7, SQL Server 2008r2, Office, Outlook, third party development tools, third party custom controls, network configuration, connections to different application servers, etc...).   This was to develop for 4 different enterprise applications .net, web, C++, C#, SQL Server,...

  • Please add the case where the iis user lost access to windows temp folder..

  • Please put a single registry directory path for all .NET entries, minimize the number of registry entries per .NET version to one entry and store all of the current stuff found in the registry for .NET in the same location as the .NET GAC assemblies for each .NET version.

    This makes each .NET version have at most 1 registry dependency and not dozens or hundreds of individually registered com components.   Please do the same for other MS products.  This makes install/uninstall simpler, less things to break given that the needed lookup data for the product is in the same location as the product's DLLs.

  • We need Visual C++ 2005/2008 Redistributable Cleanup tool.

    Visual C++ 2005/2008 Redistributable Uninstaller can't remove full files(WinSxS) & Registry keys.

  • Hi.

    Your repair tool has helped me on a number of occasions. Looking at this new version I particularly like the option for offline repair. However, what would be a useful addendum is a roll-up package that contains all the ancillary files that the repair tool might potentially require. In this way, a complete 'stand-alone' package could be created without the necessity to go looking for the downloads for specific .net versions.

    If such a package already exists, then it would be useful to provide a pointer to it from the tool's download page, and the KB article  KB2698555 ....

    Regards

  • My file needs the Microsoft net framework I have download it already but it says that it is missing in my device how I fix it? Pls help pls!

  • Of course the "in box" versions are exactly the ones we need help with, the others can already be handled by uninstall/reinstall.

    If you get lucky SFC might help, but generally unless you have OS install media with Service packs slipstreamed (basically nobody) you are screwed and must reinstall Windows.

    This makes .Net unsafe for any serious use.

  • worthstudios.com/asp.net-development.php

    This blog is highly informatics and clear.

Page 1 of 2 (16 items) 12