5

My operating system is Windows 10 Pro.

I have .NET Framework 4.8 installed. I confirm it 2 ways:

  1. Open Registry Editor then go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full key. Check the REG_DWORD entry named Release and its value is 528372. Check the REG_SZ entry named Version and its value is 4.8.04084.
  2. Open File Explorer then go to C:\Windows\Microsoft.NET\Framework folder. There I see v4.0.30319 folder. Go inside it, then open Properties of Accessibility.dll file. Go to its Details and the Product version is 4.8.4084.0.

I have Visual Studio 2019 Community Edition version 16.4.5 installed. I open it then create a new project of Class Library (.NET Framework) type. In the Configure your new project section, under Framework dropdown, I see that the highest entry is .NET Framework 4.7.2. How come there is no entry for .NET Framework 4.8? What I need to do to solve this issue?

ChumboChappati
  • 1,442
  • 4
  • 18
  • 38
  • Are you sure that's the .NET Framework 4.8 SDK? – phuzi May 20 '22 at 11:33
  • 4
    What does the VIsual Studio Installer tells you about the installed Frameworks(SDK). If 4.8 isn't checked there you should be simply able to just do that. – Ralf May 20 '22 at 11:35
  • 1
    Use the latest version of Visual Studio Community. – Robert Harvey May 20 '22 at 11:35
  • @phuzi I was told that in registry if `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full` key is not present then you do not have .NET Framework SDK 4.5 or later installed. In my case this key is present – ChumboChappati May 24 '22 at 12:35
  • How did you manage to install the 4.8 on your windows 10 ? I try it but the setup immediate fails with an in comprehensive log file as only explanation – GuidoG Aug 11 '22 at 06:32

2 Answers2

6

I have .NET Framework 4.8 installed.

There are 2 different flavors of each .NET Framework version, the runtime and the SDK. To reference .NET Framework 4.8 in VS2019, you need to install the .NET Framework 4.8 Developer Pack on the system. Just having the .NET Framework 4.8 runtime is enough to run .NET Framework apps, but not develop them.

You can see a list of all of the .NET Framework Developer Packs here:

https://dotnet.microsoft.com/en-us/download/visual-studio-sdks

You can confirm it is installed by going to "Programs and Features" in your control panel and look for "Microsoft .NET Framework 4.8 Targeting Pack".

enter image description here

Alternatively, you can install the targeting pack through the Visual Studio Installer by selecting ".NET Framework targeting pack" under "Individual components".

enter image description here

NightOwl888
  • 55,572
  • 24
  • 139
  • 212
  • How can I confirm that I do not have the 4.8 SDK? Is not the registry key `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full` telling me that I already have 4.8 SDK? Does VS2019 store 4.8 SDK in a different place than `C:\Windows\Microsoft.NET\Framework` folder? – ChumboChappati May 24 '22 at 18:08
  • Thanks for your update. I checked my "Programs and Features" and there is no `Microsoft .NET Framework 4.8 Targeting Pack` there. But there is also no `Microsoft .NET Framework 4.7 Targeting Pack` there as well, yet in VS2019 I can see `.NET Framework 4.7.2` as the highest entry under `Framework` dropdown. How come? – ChumboChappati May 25 '22 at 11:51
  • Not sure. It may have to do with whether you install the SDK from the VS installer vs downloading the targeting pack manually. Do note that the VS installer also has .NET Framework targeting options for "web development" and "desktop development", so depending on the project type and version you may need to install other components. – NightOwl888 May 25 '22 at 12:15
  • I find out `4.7.2` was coming from "Referenced Assemblies" i.e. `C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework` folder contains `v4.7.2` folder. – ChumboChappati May 26 '22 at 17:25
  • I open VS Installer and from "Individual components" section, install `.NET Framework 4.8 targeting pack` (`.NET Framework 4.8 SDK` was already showing as installed). Then open VS2019 and create new project of `Class Library (.NET Framework)` type and now I can see `.NET Framework 4.8` as the highest entry under `Framework` dropdown. Your solution work. Thanks. – ChumboChappati May 26 '22 at 17:26
  • anyone find a working answer to this? if i try to install the developer pack for, say, dotnet 4.72, it says it's already installed even though it does not show up in the programs and features! (just started happening - WTF MS?) – MC9000 Dec 04 '22 at 19:14
-1

Updates: In vs 2022, under individual components, add 4.8 targeting pack and templates.

stella
  • 1
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 08 '23 at 15:28