在 Visual Studio 2017 上使用 VC++ 2015 工具链时缺少 ATL headers

ATL headers missing when using the VC++ 2015 toolchain on Visual Studio 2017

我正在为 C++ 项目(使用 VS 2015 创建)使用 Visual Studio 2017。我收到以下错误:

1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\afx.h(345): fatal error C1083: Cannot open include file: 'atltrace.h': No such file or directory

如何安装 VS 2015 工具链的 ATL/MFC header?

详情

有一个关于 Visual C++ Build Tools 2015 的 blog post。构建工具也以独立版本发布,无需安装 Visual Studio 2015:

The Build Tools are the same C++ tools that you get with Visual Studio 2015 but they come in a scriptable standalone installer that only lays down the tools you need to build C++ projects.

Microsoft 已包含 ATL/MFC。

它们可以从 http://landinghub.visualstudio.com/visual-cpp-build-tools 下载。确保 select "ATL and MFC" 默认情况下已取消 select。