-1

I need to work on a very old C# project that uses various versions of the .NET application framework including 3.5, when opening the project this dialog is shown:

So I downloaded .NET 4.7.1 which can't be installed because a newer version of the .NET framework is already installed.

So why is VS 2019 not offering the .NET 4.8.03762 version that is installed then?
I would assume 4.x being downward compatible... is it not?

My second question is why is vs suggesting to use .NET 4.6.1 anyways, looking at the various keys in:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client  

I don't see 4.6.1 at all?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
James Baker
  • 107
  • 2
  • 11

2 Answers2

2

Try to run the Visual Studio Installer (menu Tools -> Get Tools and Features) and install required .NET Framework targeting packs (and SDKs, if needed) enter image description here

Another option is to downgrade the project target framework to the version, installed on your machine (to .NET 4.6.1, as it shown on your screenshot)

Pavel Anikhouski
  • 21,776
  • 12
  • 51
  • 66
0

Try changing the target framework version to the latest framework version available on your machine.

enter image description here

Sandeep
  • 399
  • 5
  • 15
  • i changed it to 4.8 but for that i had to also install the part to target 4.8 platforms, however i have to get some nuget packages from a private server tomorrow to test the whole application – James Baker Feb 09 '20 at 14:33