visual-studio Visual Studio - 使用从现有源代码创建项目向导时新建过滤器而不是新建文件夹
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/815993/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio - New Filter instead of New Folder when using Create Project From Existing Source Wizard
提问by Swiss
I used the Create Project From Existing Code Wizard for Visual Studio 2008, but apparently projects created this way do not allow you to create virtual solution folders, and instead only allow you to create actual system folders. I would like to have the standard project setup of Header Files, Resource Files, and Sources Files, but I seem to be unable to create the virtual files required. Is there any way to change the project so that it allows virtual folders to be created?
我使用了 Visual Studio 2008 的从现有代码向导创建项目,但显然以这种方式创建的项目不允许您创建虚拟解决方案文件夹,而只允许您创建实际的系统文件夹。我想要头文件、资源文件和源文件的标准项目设置,但我似乎无法创建所需的虚拟文件。有什么方法可以更改项目以允许创建虚拟文件夹?
回答by Michael Burr
At least for a C++ project created this way (not sure about other languages), the "Show All Files" button/option in the Solution Explorer is enabled which gives the behavior you're seeing.
至少对于以这种方式创建的 C++ 项目(不确定其他语言),解决方案资源管理器中的“显示所有文件”按钮/选项已启用,这提供了您所看到的行为。
Disable that option by clicking the icon and you'll get the behavior you're looking for.
通过单击图标禁用该选项,您将获得所需的行为。

