简体   繁体   English

Visual Studio Community 2019 中的解决方案资源管理器如何刷新?

[英]How can the Solution Explorer in Visual Studio Community 2019 be refreshed?

I have a basic c++ project in Visual Studio Community 2019. It contains three files: main.cpp, log.cpp, and log.h.我在 Visual Studio Community 2019 中有一个基本的 c++ 项目。它包含三个文件:main.cpp、log.cpp 和 log.h。 I created a fourth file called Source.cpp and then deleted this file from the file explorer in Windows 10 to see how Visual Studio would adapt to external changes to files.我创建了第四个名为 Source.cpp 的文件,然后从 Windows 10 中的文件资源管理器中删除了该文件,以查看 Visual Studio 如何适应对文件的外部更改。 Source.cpp is still visible in the solution explorer in Visual Studio. Source.cpp 在 Visual Studio 的解决方案资源管理器中仍然可见。

I have tried unloading the project and reloading it but it still appears in the solution explorer.我已经尝试卸载项目并重新加载它,但它仍然出现在解决方案资源管理器中。 I assume it's best practice to delete files from within Visual Studio's solution explorer but there must be a way to refresh the solution explorer to reflect changes made outside of Visual Studio.我认为从 Visual Studio 的解决方案资源管理器中删除文件是最佳做法,但必须有一种方法来刷新解决方案资源管理器以反映在 Visual Studio 之外所做的更改。 Similarly, if I create a new file in the project directory (same directory as the other files in the project), it doesn't appear in the solution explorer.同样,如果我在项目目录(与项目中的其他文件相同的目录)中创建一个新文件,它不会出现在解决方案资源管理器中。 If I unload the project and reload the project, the new files is still not visible.如果我卸载项目并重新加载项目,新文件仍然不可见。

How can I refresh the solution explorer?如何刷新解决方案资源管理器? My intention here is to better understand how Visual Studio organizes files in the solution explorer and how the organization relates to the actual file/directory structure in Windows.我的目的是更好地了解 Visual Studio 如何在解决方案资源管理器中组织文件,以及该组织如何与 Windows 中的实际文件/目录结构相关联。

After playing around with it for some time I realized that you can select the "Show All Files" button on the bar at the top of the Solution Explorer.在玩了一段时间后,我意识到您可以 select 解决方案资源管理器顶部栏上的“显示所有文件”按钮。 This has a refresh button that works as expected (updates the Solution Explorer with the current state of the directory folder).这有一个按预期工作的刷新按钮(使用目录文件夹的当前 state 更新解决方案资源管理器)。 It seems that files can be managed from this window and added/removed from the project in Visual Studio's default organization structure.似乎可以从此 window 管理文件,并在 Visual Studio 的默认组织结构中从项目中添加/删除文件。

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

相关问题 如何在 Visual Studio Community 2019 中格式化 JSON 文档? - How can I format JSON document in Visual Studio Community 2019? Windows 使用 Visual Studio Community 2019 的 Office 解决方案安装程序 - Windows Installer for Office solution by using Visual Studio Community 2019 如何使用 Visual Studio Community (2019) 调试 vbscript - How to debug vbscript with Visual Studio Community (2019) 是否可以将 Visual Studio 2019 配置为在解决方案资源管理器中处理旧样式和新 SDK 样式项目? - Can Visual Studio 2019 be configured to treat old style and new SDK style projects the same in the Solution Explorer? Visual Studio 2019-使用PowerShell打开文件而不是解决方案资源管理器 - Visual Studio 2019 - Use PowerShell to open files instead of Solution Explorer 在 Visual Studio 2019 解决方案资源管理器中筛选以显示被 Git 忽略的文件 - Filter To Show Files Ignored By Git In Visual Studio 2019 Solution Explorer Visual Studio 2019 - 在解决方案资源管理器中查找不在源代码管理中的项目 - Visual Studio 2019 - Find items not in source control in Solution Explorer Visual Studio 2019 社区版 - Visual Studio 2019 Community Edition Visual Studio 社区 2019 + Python - Visual Studio Community 2019 + Python Visual Studio Community 2019 上的 nUnit 3 - nUnit 3 on Visual Studio Community 2019
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM