什么是“杂项文件"?内部 DTE VS2010 解决方案? [英] What is "Miscellaneous Files" inside DTE VS2010 Solution?

查看:111
本文介绍了什么是“杂项文件"?内部 DTE VS2010 解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

跟进我之前的问题:VS2010 DTE 插件:解决方案文件夹内的项目不是项目"我成功地在解决方案中找到了我的所有项目.但是,该代码还发现了一个名为杂项文件"的额外项目.它的 Kind 与解决方案文件夹和项目也不同,但是 ProjectKinds 类中没有固定类型(就此而言,没有一个用于项目"或者...)

Following up on my previous question: VS2010 DTE Addin: project inside solution folder is not "Project" I successfully found all my projects in the solution. However, the code also founds an extra item named "Miscellaneous Files". It's Kind is different to the solution folders and the projects as well, but there are no more constant kinds fixed in the ProjectKinds class (for that matter there isn't one for "Projects" either...)

  • 这是什么东西?
  • 我应该担心这个吗?
  • 为什么 ProjectKinds中没有更多的常量?

推荐答案

  • 杂项文件"节点用于包含与解决方案中的当前项目内容无关的打开文件.例如,从 C:\Foo\MySolution\ 打开一个解决方案,然后从 C:\SomeOtherPath\MyFile.cs 打开一个松散"文件,您会注意到它存储在杂项文件"下.如果在这些文件打开时保存解决方案,则此信息将保留,一旦解决方案关闭,这些信息就会从其他文件"中删除.

    • The "Miscellaneous Files" node is used to contain open files that are not associated with the current project contents within the solution. For example, open a solution from C:\Foo\MySolution\ then open a 'loose' file from C:\SomeOtherPath\MyFile.cs, you'll notice that it stored under "Miscellaneous files". This information is persisted if the solution is saved whilst these files are open, it is removed from "Miscellaneous files" once the solution is closed.

      如果您希望在解决方案资源管理器中查看"杂项文件"的内容,您需要在工具>选项>环境>文档>在解决方案资源管理器中显示杂项文件

      If you wish to "see" the contents of "Miscellaneous Files" in Solution Explorer you need to enable it in Tools > Options > Environment > Documents > Show miscellaneous files in Solution Explorer

      https://docs 上查看有关其他文件的更多信息.microsoft.com/en-us/visualstudio/ide/reference/miscellaneous-files

      这取决于您的工具(插件、宏)想要做什么.

      It depends what your tooling (addin, macro) wants to do.

      您可以使用 EnvDTE.Constants.vsProjectKindMisc 识别杂项文件项目.

      You can use EnvDTE.Constants.vsProjectKindMisc to identify miscellaneous files projects.

      这篇关于什么是“杂项文件"?内部 DTE VS2010 解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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