11

I've installed .NET Framework 4.6.2 via the web installer, and everything looked good. However, after I restarted and opened up Visual Studio, it reported that 4.6.2 was not installed:
enter image description here

I checked registry per MSDN and did find the expected entries under HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full:
HKLM\S\MS\NFS\NDP\4\Full

Additionally, under HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs, there is an entry for 4.6.2, as well as others: HKLM\S\MS\NFX\4\SKUs\NFX462

I also checked the installer's log file to see if there were any issues, but nothing stood out. Towards the bottom, I see:

MSI (s) (AC:E0) [10:06:03:829]: Note: 1: 1707 
MSI (s) (AC:E0) [10:06:03:829]: Product: Microsoft .NET Framework 4.6.2 -- Installation completed successfully.

MSI (s) (AC:E0) [10:06:03:830]: Windows Installer installed the product. Product Name: Microsoft .NET Framework 4.6.2. Product Version: 4.6.01590. Product Language: 0. Manufacturer: Microsoft Corporation. Installation success or error status: 0.

MSI (s) (AC:E0) [10:06:03:830]: Value of RebootAction property is MSI (s) (AC:E0) [10:06:03:830]: Windows Installer requires a system restart. Product Name: Microsoft .NET Framework 4.6.2. Product Version: 4.6.01590. Product Language: 0. Manufacturer: Microsoft Corporation. Type of System Restart: 2. Reason for Restart: 1.

MSI (s) (AC:E0) [10:06:03:831]: Product: Microsoft .NET Framework 4.6.2. Restart required. The installation or update for the product required a restart for all changes to take effect. The restart was deferred to a later time.

This is a Windows 7 Pro machine running Visual Studio 2017 Community Edition, and I am not logged in as a system administrator. Does anyone know how to make VS recognize this framework version as a valid target?


NOTE: I've already see this question. This appears to be a different issue.

p.s.w.g
  • 373

3 Answers3

13

I've installed .NET Framework 4.6.2 via the web installer, and everything looked good. However, after I restarted and opened up Visual Studio, it reported that 4.6.2 was not installed: enter image description here

You need to download and install the .NET Framework 4.6.2 Developer Pack, which includes the .NET 4.6.2 Targeting Pack, after doing so you will be able to target that specific version of the .NET Framework

Source: Targeting .NET Platforms

Ramhound
  • 44,080
3

(A solution was already provided by @Ramhound but i want to give a more detailed explanation.)

First, (already answered but still important) NDP means .NET Developer Pack. You need the Developer Pack, not just the Runtime.

I had the same problem even after i installed the .NET Developer Pack 4.6.2 named NDP462-DevPack-KB3151934-DEU.exe from here which redirects to here, i still got the same error message Project Target Framework Not Installed when opening a foreign solution from Github.

Notice the DEU suffix in the installer's filename. It's just the language pack for german (deutsch) which has a significant smaller file size. That's the problem. Quote from the download page: You need to install the .NET Framework 4.6.2 Developer Pack prior to installing language packs. But here it becomes kinda cynical, there is no link to that download on this page. The Developer Pack links are linked to the language packs and the Runtime links are linked to some web-installers.

Solution: Thx to @Ramhound i found the full english .NET Developer Pack 4.6.2 NDP462-DevPack-KB3151934-ENU.exe here. After installing this pack, my Visual Studio Community 2017 found the target 4.6.2 correctly.

Update:

One part of the problem is that there are different redirects based on the browsers language setting. Browsers which have another language than english as a default setting are redirected to the language pack.

Test: Clicking on the link found on this page in Firefox with about:config / int.accept_languages set to

de-DE, de redirect to NDP462-DevPack-KB3151934-DEU.exe but

en-US, en redirect to NDP462-DevPack-KB3151934-ENU.exe

Another part of the problem is that the download link and the downloaded filename are named Developer Pack even though it's just the language pack.

Doomjunky
  • 131
0

This is easily resolved by installing the .NET Framework 4.6.2 Developer Pack from here. https://www.microsoft.com/net/targeting

Once installed you will see the desired version and you can use all those new C# 7 features, rock!

I am certain this will be included in an up and coming update, until, just manually install it.

Credits goes to BenjaminPerkins for finding this solution! https://blogs.msdn.microsoft.com/benjaminperkins/2017/03/23/net-framwork-4-6-2-not-in-visual-studio-2017/