Visual Studio doesn't recognize .NET Framework 4.6.2 is installed

22,807

Solution 1

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

Solution 2

(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.

Share:
22,807

Related videos on Youtube

p.s.w.g
Author by

p.s.w.g

Updated on September 18, 2022

Comments

  • p.s.w.g
    p.s.w.g over 1 year

    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.

    • Ƭᴇcʜιᴇ007
      Ƭᴇcʜιᴇ007 over 6 years
      You say you saw the other question but the instruction in the answer to that question (an d what' sin you link MSDN article) is not what you've done here. So far what you're showing here is perfectly normal and correct. You're supposed to be looking under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full branch, not under the v4.0 branch (note: v4, not v4.0). :) Also, which version of Visual Studio are you using?
    • Ramhound
      Ramhound over 6 years
      What version of Visual Studio are you using? Update your question to include this information. Given the contents of the log you provided, have you restarted your system, if you have not performed a restart then you should do that before updating your question.
    • p.s.w.g
      p.s.w.g over 6 years
      @Ƭᴇcʜιᴇ007 I read the other question, but not closely enough I suppose. It is there under v4 (I'll update the question shortly), but VS is still reporting it as not installed. VS Version=2017
    • p.s.w.g
      p.s.w.g over 6 years
      @Ramhound Updated question and provided missing information. I did restart the system after the install.
    • Ramhound
      Ramhound over 6 years
      "Does anyone know how to make VS recognize this framework version as a valid target?" - You need to install the .NET 4.6.2 Targeting Pack.
    • p.s.w.g
      p.s.w.g over 6 years
      @Ramhound Ah, that makes complete sense. VS seems to have a bug right now where selecting the second radio button and clicking OK just opens the MSN homepage rather than taking me to the intended URL, so I just downloaded and installed 4.6.2 by itself (trying to fix the problem described in the first sentence of the dialog box without noticing to the targeting pack part of that radio option). Thank you. I'd gladly accept that as an answer.
    • Ƭᴇcʜιᴇ007
      Ƭᴇcʜιᴇ007 over 6 years
    • Ƭᴇcʜιᴇ007
      Ƭᴇcʜιᴇ007 over 6 years
    • Ramhound
      Ramhound over 6 years
      @Ƭᴇcʜιᴇ007 - I would rather close that question, as a duplicate of this question, due to the quality of this question. The author duplicate question never clarified what the problem is the fact it got a correct answer is basically just luck.
    • Ƭᴇcʜιᴇ007
      Ƭᴇcʜιᴇ007 over 6 years
      @Ramhound Yeah that was why I just put it in as a comment and didn't actually flag to close as a dupe. ;) If you vote to close the other as a dupe of this I'll throw a vote at it as well.
    • Ramhound
      Ramhound over 6 years
      @Ƭᴇcʜιᴇ007 - Done
  • Ramhound
    Ramhound over 6 years
    The link I provided, Targeting .NET Platforms is page which lists all the different versions of the available developer packs. I already what was happening so I knew the solution off the top of my head.
  • Ramhound
    Ramhound about 5 years
    I was able to find a download to the same file, you indicated should be used, by using the original link I provided. I am confused by this answer. The question’s author made no mention of needing a .NET language pack.
  • Doomjunky
    Doomjunky about 5 years
    The failure doesn't happen to you @Ramhound because your browser's accepted language setting is most likely set to en-US, en. I just tested this on Firefox: about:config / intl.accept_languages. The option en-US, en works fine and leads me to the full english NDP, but the option de-DE, de leads me to the german language Pack without the possibility to find any link to the full english NDP.