HOW TO: Install the MFC individual component

Reference: Q0065

Article last modified on 20-Jun-2020


The information in this article applies to:

  • XLL+ for Visual Studio 2019 - 7.0

How do I install the MFC individual component?

Issue

In Visual Studio 2019 I encounter a build error while compiling a resource file:

fatal error RC1015: cannot open include file 'afxres.h'

Summary

When you installed Visual Studio 2019, some required components were not automatically installed, including the MFC and ATL individual components for C++. Use the Visual Studio installer to install these components.

Procedure

To install these components, start the Visual Studio installer and follow the steps below.

  1. Select the Individual components tab.

  2. In the searchbox, enter mfc.

  3. Place a check against component C++ MFC for latest v142 build tools (x86 & x64). Note that this will also automatically install the equivalent ATL component.