I installed Visual Studio Enterprise 2022 64 bit Version 17.1.3 on Windows 10 21H2 and with Python 3.9.12 installed under C:\Python\Python39_64.
I created a project via "Python Application". As soon as I created this project, I ended up with this Error.
The reference assemblies for .NETFramework, Version=v4.0 were not found. To resolve this, install the Developer Pack (SDK/Targeing Pack) for this framework version or retarget your appliation. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developpacks
I downloaded .Net Framework v4.8 Developer Pack as recommended and installed it.
I looked into C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework
I see v4.0, v4.5, v4.5.1, v4.5.2, v4.6, v4.6.1, v4.7.2, v4.8, v4.X
However, in C:\Program Files\Reference Assemblies\Microsoft\Framework
I only see v3.0, v3.5
The .Net Framework v4.8 Developer Pack only installed v4.8 under C:\Program Files (x86), not in C:\Program Files.
The error remains.