简体   繁体   English

如何在 Visual Studio 中打开 C++ 项目文件夹?

[英]How do I open a c++ project folder in visual studio?

I have a c++ project with lots of folders and compiles to lots of different executables, I want to open the entire thing in visual studio and have it keep the folder structure of my project.我有一个 C++ 项目,有很多文件夹并编译成很多不同的可执行文件,我想在 Visual Studio 中打开整个东西并让它保持我项目的文件夹结构。

Right now when try to create a new VS project and import my non-VS c++ project, it automatically puts all header files in one folder and source files in another completely ignoring my folder structure.现在,当尝试创建一个新的 VS 项目并导入我的非 VS C++ 项目时,它会自动将所有头文件放在一个文件夹中,将源文件放在另一个文件夹中,完全忽略我的文件夹结构。 How do I get visual studio to keep my folder structure when opening a C++ project that's not created with visual studio?打开不是用 Visual Studio 创建的 C++ 项目时,如何让 Visual Studio 保持我的文件夹结构?

I suppose you can select the project and then select Show All Files from Solution Explorer tool bar.我想您可以选择项目,然后从Solution Explorer工具栏中选择Show All Files You can then Include and Exclude files/folders from the project directory.然后,您可以从项目目录中包含和排除文件/文件夹。

Right click the folder you want them to be in in Solution Explorer , select Add->Existing Item...右键单击您希望它们在解决方案资源管理器中所在的文件夹,选择添加->现有项目...

This skips a lot of the nice updating/verifying performed when you create a new VS project from existing files but is one way to structure a lot of files.这跳过了从现有文件创建新 VS 项目时执行的许多不错的更新/验证,但这是构建大量文件的一种方法。

I'd prefer to manage them within Solution Explorer but I feel this is so obvious you either dissapprove or have a prohibitively large number of files to hunt and sort them with the small Solution Explorer window pane.我更喜欢在解决方案资源管理器中管理它们,但我觉得这太明显了,你要么不赞成,要么有大量的文件需要使用解决方案资源管理器的小窗口窗格来搜索和排序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 visual studio c++ 打开特定文件夹中的文件 txt? - How do I open a file txt in a specific folder using visual studio c++? 如何将扩展链接到Project(Visual Studio C ++) - How do I link Extensions to Project (Visual Studio C++ ) 如何使用Visual Studio 2008打开vcxproj(Visual C ++项目) - How to open vcxproj (visual c++ project) with visual studio 2008 如何在 Visual Studio 2017 中无错误地打开 Visual Studio 2019 c++ 代码? - How do i open Visual Studio 2019 c++ code in Visual Studio 2017 without errors? 如何使Visual Studio 2015 C ++项目与Visual Studio 2010兼容? - How do I make a Visual Studio 2015 C++ project compatible with Visual Studio 2010? 我可以在 MAC 上打开现有的 Visual Studio 项目 (C++) 吗? - Can I open an existing Visual Studio Project (C++) on MAC? 如何在 Visual Studio 中创建 C++ 项目过滤器/文件夹? - How to Create C++ Project Filter/Folder in Visual Studio? Visual Studio C ++项目管理。 如何处理项目中的非代码文件? - Visual Studio C++ project management. How do I handle non-code files in a project? 拆分一个Visual Studio C ++项目:如何(几乎)自动做到? - Split a Visual Studio C++ project : how to do it (almost) automatically? 您如何打包要发布的 Visual Studio C++ 项目? - How do you pack a visual studio c++ project for release?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM