'How to install MFC on Visual Studio 2019

I've installed MFC extension for VS 2019 version 16.7 on Windows x64 operating system using the following extensions:

  1. desktop application development with c++
  2. C++ v14.26 MFC for v142 build tools (x86 & x64)
  3. C++ v14.26 MFC for v142 build tools with Spectre Mitigations (x86 & x64)
  4. C++ ATL for the v142 build tools
  5. ATL and MFC for the v141 build tools

But when I open a new MFC project, and try to build it, even before editing, I get the following error: MSB804: Severity Code Description Project File Line Suppression State Error MSB8041 MFC libraries are required for this project. Install them from the Visual Studio installer (Individual Components tab) for any toolsets and architectures being used. MFCApplication1 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets 451

I don't know what libraries can be missing at this point, I thought I've installed every possible extension. perhaps someone has an idea what did I do wrong or what library am I missing?

Thank you very much.



Solution 1:[1]

Open Visual Studio Installer - > Modify - & gt; 
For a single component, select install:
    C++ATL for v142 (x86 and x64)
    C++MFC for v142 (x86 and x64)
    C++ v14.21 ATL for v142 (x86 and x64)
    C++v14.21 MFC for v142 (x86 and x64)

If the same error still occurs, install
    C++ATL for the latest v142 build tools
    C++ MFC for the latest v142 build tool

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 又是那条吊带裙