如何查找Visual Studio项目中缺少的文件?

编程入门 行业动态 更新时间:2024-10-15 10:17:40
本文介绍了如何查找Visual Studio项目中缺少的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

由于合并等问题,我们有很多项目文件未包含其文件夹中的所有源代码文件.

Due to issues with merging etc, we have lots of project files that don’t contain all source code files that are within their folders.

在我编写一个小工具来检查项目文件中是否包含每个*.cs文件之前,我希望确保之前没有其他人这样做过.

Before I write a little tool, that checks that every *.cs file is included in a project file, I wish to make sure that no-body else has already done that before.

(我们有将近100个项目文件和1000个C#文件)

(We have close to 100 project files, and 1000s of C# files)

很明显,Visual Studio现在对使用通配符包括项目中给定目录中的所有"* .cs"文件的支持是解决此问题的最佳方法.这样,添加".cs"文件(重命名为ete)时就无需更新项目文件.但是,只有在VS2017中,才可以从UI中使用它.

Clearly the support that visual studio now has for using wildcards to include all "*.cs" files from a given directory in the project is the best solution to this problem. In that there is then no need to update project files when ".cs" files are added, renamed ete. However it is only in VS2017 that this become usable from the UI.

推荐答案

有了这么多的文件和项目,听起来您可能希望自动化一些.但是,有一种手动方法(不确定您是否已经知道):

With that number of files and projects, it sounds like you might want something more automated. However, there is a manual approach (not sure if you are already aware of it):

  • 在解决方案资源管理器"窗格中选择项目
  • 项目菜单->显示所有文件
  • 在项目下,不属于项目的文件将显示为幽灵"图标
  • 选择所需文件,然后从上下文菜单中选择包含在项目中"
  • 更多推荐

    如何查找Visual Studio项目中缺少的文件?

    本文发布于:2023-11-09 04:34:07,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1571416.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:文件   项目   Visual   Studio

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!