具有多个文件夹的Visual Studio项目 [英] Visual Studio projects with multiple folders

查看:185
本文介绍了具有多个文件夹的Visual Studio项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个简单的方法来使用Visual Studio中的项目中的多个文件夹?它有过滤器,它看起来像文件夹,但它是真的很好,能够在VS中创建文件夹和插入文件。是否有加载项或秘密选项来启用此行为?

Is there an easy way to use multiple folders in a project with Visual Studio? It has "filters" which look like folders, but it would be really nice to be able to make folders and insert files in them inside VS. Is there an add-in or secret option to enable this behavior?

推荐答案

使用VC ++,文件夹不直接对应什么在您的文件系统上。它们只是用来帮助您以独立的方式组织您的项目。

With VC++, the folders do not correspond directly with what's on your file system. They are simply used to help you organize your project in an independent manner.

他们有这个设计决策的原因是因为在C ++中,你通常有很多include和source目录。

The reason they have this design decision is because with C++ you typically have many include and source directories.

有关过滤器的详情

窗口,您将看到一个工具栏按钮,当悬停在上面显示显示所有文件。如果按下此按钮,则不会显示文件夹/过滤器结构。如果未按下此按钮,将显示文件夹/过滤器结构。

At the top of your "Solution Explorer" window you will see a toolbar button that when hovered over says "Show All Files". If this button is pressed it does not show you a Folder/Filter structure. If this button is not pressed it shows you the Folder/Filter structure.

要添加新的文件夹/过滤器,请右键单击解决方案的项目,然后选择添加 - >新建过滤器。

To add a new Folder/Filter, right click on a project of your solution and select Add -> New Filter.

请注意,对于您创建的每个文件夹/过滤器,您可以进入文件夹/过滤器属性,并设置以下内容:

Note that for each Folder/Filter that you create you can go into the Folder/Filter properties and set things such as:


  • 解析文件:是否解析此文件夹中的文件以自动完成

  • SCC文件:是否应考虑此文件夹中的文件源控件

  • 过滤器:指定此文件夹默认保存的文件类型。

这篇关于具有多个文件夹的Visual Studio项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆