Many of today’s mainstream and custom Windows applications (including our very own PDQ Deploy & Inventory) rely upon .NET Framework to function, akin to how I require energy drinks and synthwave beats to function. And just as I ensure my fridge is always stocked and my headphones charged, ensuring your Windows devices have the tools, or framework in this case, necessary to crunch all those zeros and ones is crucial.
In this article, we’ll cover everything you need to know about managing .NET Framework, including how to install it, how to remove it, and how to repair it when things go catawampus.
What is .NET Framework?
.NET Framework is a development framework used by both developers and users to build and run Windows applications.
For developers, .NET Framework is an attractive development model as it has an extensive class library containing common types and APIs that software engineers can use to rapidly create applications. Its Common Language Runtime (CLR) execution engine not only manages running applications but also provides services, such as memory management, exception handling, and more.
For users, .NET Framework is a mostly hidden component of the Windows operating system, used by applications developed for .NET Framework. While most .NET Framework applications are compatible with current versions, some legacy applications may require specific versions of .NET Framework to function.
Does .NET Framework come preinstalled on Windows?
Yes, .NET Framework comes preinstalled on Windows 10 and Windows 11. Both versions of Windows come with .NET Framework 4.8. .NET Framework 3.5 is included as an optional Windows component but is not enabled by default.
How can you tell what version of .NET Framework is installed?
You can identify which versions of .NET Framework are installed on your Windows 10 and Windows 11 computers using the Windows Registry Editor, Windows Explorer, Command Prompt, and PowerShell. Let’s briefly go over how to use each method.
Centralize your Windows device management
Gain real-time visibility, deploy software, remediate vulnerabilities, schedule reports, automate maintenance tasks, and access remote devices from one easy-to-use platform.
Identify .NET Framework versions with Windows Registry Editor
Here’s how to identify what versions of .NET Framework you have installed using Windows Registry Editor.
Enter regedit into the Windows search field, then click Registry Editor.
If prompted with a UAC prompt, click Yes.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP.
The registry keys of the .NET Framework versions you have installed will display.
Click into the subkeys to identify the specific version number.
If you want to take things to the next level, you can use these registry keys to build a registry scanner in PDQ Inventory and PDQ Connect.
Identify .NET Framework versions with Windows Explorer
Here’s how to identify what versions of .NET Framework you have installed using Windows Explorer.
Open Windows Explorer (Win + E), then navigate to C:\Windows\Microsoft.NET\Framework.
You’ll see the various major versions of .NET Framework broken out into separate folders.
To find the specific version for any of the .NET Framework installs, click into one of the folders, then right-click on a .DLL or .EXE file, and click Properties.
Click on the Details tab.
The product version is listed in the Details tab.
Identify .NET Framework versions with Command Prompt
Here’s how to identify what versions of .NET Framework you have installed using Command Prompt.
Enter cmd into the Windows search field.
Right-click on the Command Prompt result, then click Run as administrator.
Click Yes at the UAC prompt.
Enter the following command:
reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP" /s
Depending on the number of different .NET Framework versions you have installed, this may return quite a few results. However, you should be able to identify the various versions by scrolling through the results.
Identify .NET Framework versions with PowerShell
Here’s how to identify what versions of .NET Framework you have installed using PowerShell.
Enter PowerShell into the Windows search bar.
Right-click on the PowerShell results (version shouldn’t matter), then click Run as administrator.
Click Yes at the User Account Control prompt.
Enter and run the following command:
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}'} | Select PSChildName, version
Unsurprisingly, PowerShell does an amazing job gathering the necessary details and outputs it in an easy to read format.
PDQ Connect makes it easy to run PowerShell commands, just like the one above, against remote devices. Try it free for 14 days.
Can you install multiple versions of .NET Framework?
Multiple versions of .NET Framework can be installed on a single Windows computer without conflict. If you have multiple versions of .NET Framework on your computer, chances are it’s because an application requires a specific version to function.
Now if I could just get my kids to coexist without conflict, that would be great. Maybe I should have them learn about .NET Framework.
How to install .NET Framework
As mentioned above, Windows 10 and Windows 11 come preinstalled with .NET Framework 4.8. However, if you want to install a different version, here’s how.
How to install .NET Framework 3.5
You can easily install .NET Framework 3.5 Service Pack 1 using the Turn Windows features on or off menu.
In Windows 10 or Windows 11, enter Turn Windows features on or off in the Windows search bar.
Click the Turn Windows features on or off result.
Select .NET Framework 3.5 (includes .NET 2.0 and 3.0), then click OK.
If you receive a Windows prompt indicating it needs files from Windows Update, click Let Windows Update download the files for you.
Windows will download the necessary files for .NET Framework SP1 and apply the changes. You may need to restart your PC for the changes to take effect.
Alternatively, you can use this easy command to achieve the same results with way less clicking (and you get to feel like a hacker, which is an obvious bonus):
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
How to install other versions of .NET Framework
To install a specific version of .NET Framework, head over to the Microsoft-hosted .NET Framework download page, click the link for the version you need, then download the runtime installer. Once the installer downloads, double-click the installer file and complete the setup. And this may be obvious, but try to avoid using .NET Framework versions that are no longer supported. Your friends in cybersecurity will thank you.
You will not be able to install earlier versions of .NET Framework 4.x on devices with the latest version of .NET Framework already installed because .NET Framework 4.x uses in-place updates. However, you most likely shouldn’t need to use earlier versions of .NET Framework 4.x because of its built-in backwards compatibility.
How to uninstall .NET Framework
You cannot completely uninstall .NET Framework from Windows 10 and Windows 11. It’s considered a core component of the operating system. However, you can uninstall .NET Framework 3.5 SP 1 by disabling the feature.
In Windows 10 or Windows 11, enter Turn Windows features on or off in the Windows search bar.
Click the Turn Windows features on or off result.
Uncheck .NET Framework 3.5 (includes .NET 2.0 and 3.0).
Click OK.
After clicking OK, Windows removes the .NET Framework 3.5 SP1 files and makes the necessary changes. You may need to restart the computer for the changes to be recognized, but in our testing, this wasn’t the case.
And for all you Command Prompt gladiators out there, here is a handy command for removing .NET Framework 3.5 SP 1:
DISM /Online /Disable-Feature /FeatureName:NetFx3
How to repair .NET Framework
Because .NET Framework is a core component of Windows 10 and Windows 11, it can’t be repaired by uninstalling and reinstalling it. However, here are a few methods you can use to repair .NET Framework 4.8 if it becomes corrupt or is missing files.
Use the .NET Framework Repair Tool: This is a Microsoft-developed tool designed to detect and fix common issues with .NET Framework, and it works on all currently supported versions of .NET Framework.
Install the latest Windows updates: .NET Framework 4.8 is updated through Windows updates, which automatically tries to install missing updates.
Run the System File Checker: You can try running built-in Windows tools to repair .NET Framework. From an elevated Command Prompt, run
DISM.exe /Online /Cleanup-image /Restorehealth
. When that finishes, runsfc /scannow
.
If you’re trying to repair .NET Framework 3.5 SP1, you can try removing it and then reinstalling it using the methods described in the previous sections.
.NET Framework, it’s dot com
.NET Framework has seen many improvements over the years, including how to manage it. Making it a core component of Windows 10 and Windows 11 has (for the most part) drastically simplified how it’s managed. And while I may have just given away how old I am, if you understand the reference/Easter egg in the header to this section, just know that I’m showering you with digital praise from a subnet far, far away.
Now I’m off to go restock my fridge and charge my headphones.