'How to install .NET 4 Framework in Windows 10
How can I install the .NET 4.0 Framework in Windows 10? .NET 4.6 is already installed but I want to have .NET 4 Framework (without modifying the registry).
Turning on and off Windows features in control panel does not have any effect.
Solution 1:[1]
If you really want to install the development part of .NET 4.0 or 4.5.2 in Windows 10 you need, depending on the version, the following:
The libraries:
for 4.5.2, grab the .NET framework 4.5.2 Developer Pack
for 4.0, grab the Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO), mount it and run
Setup\SDKSetup.exe(the autorun will cry that .NET 4 isn't available in Windows 10 so go directly toSDKSetup.exe). Note that you'll need to grabGRMSDKX_~, which is probably the x64 version out of the 3 available there, {x86, itanium, x64}, otherwise it cries about not finding some file.Anyways, install from there only 1 package -
.NET Development\Intellisense and Reference Assembliesand move further.- upgrade 4.0 to the latest 4.0.3 with the Multi-Targeting Pack for Microsoft .NET Framework 4.0.3 (KB2600213)
The tools (
csc,msbuild): grab the 2017 versions, the newest, as they'll work with both 4.5.2 or 4.0 from before. Go to the Visual Studio downloads site, scroll down and download from way below the Build Tools for Visual Studio 2017 package.From the setup you'll need the following Individual components:
- .NET Framework 4.6.1 SDK
- .NET Framework 4.6.1 targetting pack (they're useful because they bring nice executables such as
tlbimp.exefor example) - C# and Visual Basic Roslyn compilers (brings
csc.exeandmsbuild.exe)
You should be golden now!
Solution 2:[2]
I have experienced, I have to open and work with an old project that is required .Net 4.0 to build (they're related to some old libraries) and can not be updated to new .Net version.
I did try to uninstall the current .Net version (4.6, 4.8) and to install .Net 4.0 standalone (dotNetFx40_Full_x86_x64.exe) but it doesn't work. And I finally decided to install the old Visual Studio (2019) with only some basic features that I manually checked to be lightweight, it works well now.
Solution 3:[3]
If you manage to use a tool to remove Net Framework 4+ from Windows 10 ISO for a fresh install.
Then you can then install a fresh install of Net Framework 4.5, not 4.0. Since Windows 10 would not allow that for 4.0.
I'm really unsure if there are some removal tools for 4.6 and 4.7. Since I've tried the direct way to work with installation of 7 SDK. But then only 4.5 is able to be installed.
Then it's possible to install Windows 7 SDK fully, when you install 4.5.
If Windows 7 SDK cries for 2.0 or 3.5 install it in the apps and features.
You can use a tool called NTlite and edit the .wim file installation of Windows 10. Then use compatibles to remove 4+. Then save and start up the copied ISO in C:, and start an installation in Windows 10. That way you also can keep settings and apps that you already installed, just removing main source files of Windows 10. Also keeping your Windows Activated.
Solution 4:[4]
You can not install older version. As you're already running on .Net framework 4.6, it is not possible to downgrade it. However, Windows 10 already comes with .NET framework by default, why do you need to install the older version?
According to this website, you can either choose web installer or offline installer for installing .NET framework. You can try downloading the .NET framework 4 from here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | foxx1337 |
| Solution 2 | Toan NC |
| Solution 3 | |
| Solution 4 | Uday |
