You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Visual Studio 2017创建C++ Empty Project时缺失默认文件组的问题咨询

Fix for Missing Default File Groups in Visual Studio 2017 C++ Empty Project

Hey there, I’ve dealt with this exact issue before when working with VS2017—those default file groups like External Dependencies, Header Files, Resource Files, and Source Files failing to show up after creating an empty C++ project. Let’s walk through some reliable fixes:

1. Manually Add the Missing Filters

If the project template skipped creating these groups, you can add them yourself easily:

  • Right-click your project in the Solution Explorer → Add → New Filter
  • Create filters named exactly: External Dependencies, Header Files, Resource Files, Source Files
  • Once added, VS will automatically associate any new files you add (like .cpp or .h) to the correct filter, and External Dependencies will start showing included system headers.

2. Verify Your C++ Workload is Installed

Sometimes missing core components can break project templates:

  • Open the Visual Studio Installer
  • Select your VS2017 installation and click Modify
  • Ensure the Desktop development with C++ workload is checked, along with all required sub-components (like MSVC v141 build tools, Windows SDK, etc.)
  • Click Modify to install any missing parts, then restart VS.

3. Reset Visual Studio Settings

Corrupted settings can mess with template behavior:

  • Open VS2017 → go to Tools → Import and Export Settings
  • Choose Reset all settings, save your current settings if you want, then select C++ Development Settings as the default to reset to.
  • Restart VS and try creating a new empty project again.

4. Repair Your Visual Studio Installation

If templates or core files are damaged, a repair often fixes it:

  • Open the Visual Studio Installer
  • Select your VS2017 installation and click Repair
  • Let the installer run its course (this might take a while), then restart VS and test creating a new project.

5. Add a File to Trigger Group Display

Empty projects sometimes don’t show these groups because there’s no content to organize:

  • Right-click your project → Add → New Item
  • Create a .cpp file (e.g., main.cpp) and a .h file (e.g., utils.h)
  • After adding these files, VS should automatically create the corresponding Source Files and Header Files groups, and External Dependencies will appear once you include system headers (like <iostream>) in your code.

内容的提问来源于stack exchange,提问作者George G

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:51:27