How to install MFC on Visual Studio 2019
Asked Answered
W

1

7

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.

Weekday answered 20/8, 2020 at 6:50 Comment(2)
To build with the default settings, make sure you installed "C++ MFC for latest v142" and the same for ATL.Marj
Remind me again, how do I set which MFC version is used?Omphalos
W
7
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
Wilbertwilborn answered 13/4, 2022 at 9:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.