When you install a program that uses .NET Framework, the following error message may appear:
.NET Framework initialization Error Please set registry key HKLM\SOFTWARE\Microsoft\.NETFramework\InstallRoot to point to the .NET Framework installation
Running the .NET Framework Repair tool or removing and reinstalling .NET Framework may not resolve the error.
Cause
The above error occurs due to the missing InstallRoot registry value in one or both of the following keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework
Resolution
To fix the .NET Framework initialization Error, please create the missing values in the registry.
Option 1: Use the REG file to restore the missing values
To restore the InstallRoot registry values, download and run netfx_installroot_fix.reg (zipped)
Unzip and run the enclosed REG file.
Click Yes to confirm.
Option 2: Create the values manually
- Launch Regedit.exe and go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
- In the right pane, create a new string value (REG_SZ) named InstallRoot (if it doesn’t already exist.)
- Set the value data of InstallRoot to C:\Windows\Microsoft.NET\Framework64\
- Next, go to the following branch:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework
- In the right pane, create a new string value (REG_SZ) named InstallRoot (if it doesn’t already exist.)
- Set the value data of InstallRoot to C:\Windows\Microsoft.NET\Framework\
- Exit the Registry Editor.
Note: The 2nd location above (i.e., the WOW6432Node branch) doesn’t exist if you’re using Windows 10/11 32-bit edition. In that case, skip the 2nd location. To determine if you’re using 32-bit or 64-bit edition, see this article How to Find Your Windows 10/11 Build Number, Version, Edition and Bitness.
That should resolve the .NET Framework “InstallRoot” error.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!