Search code examples
visual-studio-2010add-inprojects-and-solutions

What is "Miscellaneous Files" inside DTE VS2010 Solution?


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...)

  • What is this item?
  • Should I be concerned about this?
  • Why are there no more constants in ProjectKinds?

Solution

    • 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

      See more about miscellaneous files at https://learn.microsoft.com/en-us/visualstudio/ide/reference/miscellaneous-files

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

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