“Unknown Hard Error” during Microsoft .NET 4.5.1 – 4.6 update (or install)

Some installations of Caseworx and TODDS have exhibited an error showing “Unknown Hard Error” and not completing the Microsoft .NET Update for versions 4.5.1, 4.5.2, and 4.6. This may occur during the installation of the product,  or after an update. The error does not occur in the program itself, but rather the Microsoft installer that is updating the .NET technology.

Cause:

The most common cause seems to be that the Microsoft RyuJIT preview was installed on the machine at one time. This preview version prevents the final version in .NET 4.6 from completing the install

Resolution:

The preview version must be removed and all traces of it’s registry/environment must be reset.

Steps:

The following involves editing the registry and environmental variables. If you are unsure or uncomfortable performing these steps, contact your IT professional.

  1. Open the Registry Editor and look for the following key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AltJit
    If found, remove the key from the registry. Also, check the left side of the registry editor or any subkeys labeled “AltJit”. If found, remove the subkey also.
    —–
    OR
    —–
    Download the following registry file and double-click it to clear the setting (you can safely ignore any browser/antivirus warnings, it only removes the above listed entry):
    http://jklsoftware.com/downloads/removeAltJit.reg
  1. Go to Control Panel, System, “Advanced System settings” (left side). On the panel that appears, click the “Environment Variables” button at the bottom. Look at the bottom of the window that appears in the section titled “System Variables” and look for an item named “COMPLUS_AltJit”. If found, highlight and delete it.
  1. Then, go to Control Panel, Programs and Features, and look for “Microsoft .net RyuJIT Preview”. Uninstall it if found. Also, look for Microsoft .NET Framework 4.6. Uninstall it if found.
  2. Install the Microsoft .NET 4.6 Framework from http://www.microsoft.com/en-us/download/details.aspx?id=48130 You may be asked to reboot your computer. Perform the reboot if asked.
  3. Start TODDS/Caseworx, it may or may not ask for the .net 4.6 update. If it does require additional .net items, proceed with the .net update. It should succeed with these items cleared.
  4. If you continue to get the “Unknown Hard Error” message, and did not reboot in step 4, perform a reboot – a Windows program that was running probably prevented all files from updating successfully.