Project Priority

Project Priority

A project item usually is a member of only one project in the solution. Therefore, the IDE can easily determine which project is used to open the item. However, if an item is a member of more than one project, the IDE uses a priority scheme to determine the best project for opening the item.

The following list shows the project priority scheme:

  • The IDE calls the IsDocumentInProject method for each project in the solution to determine whether the document is a member of that project.

  • If the document is a member of the project, the project responds with a priority that the project assigns according to its handling of that document. For example, a language project responds with a high priority for its language source files but responds with a lower priority for an unrecognized file type that is not used as part of its build process.

  • Projects that provide custom, project-specific editors or designers for a document also receive a high priority.

  • The VSDOCUMENTPRIORITY enumeration provides the document priority values.

  • The project that specifies the highest priority is given the context to open the document. If two projects return equal priority values, the active project is preferred. If no project in the solution responds that it can open the document, the IDE puts the document in the Miscellaneous Files project. For more information, see Miscellaneous Files Project.

Community Additions

© 2016 Microsoft