Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

_Solution.FindProjectItem Method

Locates an item in a project.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)
ProjectItem FindProjectItem(
	string FileName


Type: System.String

Required. The name of the project item.

Return Value

Type: EnvDTE.ProjectItem
A ProjectItem object.

FindProjectItem performs an ItemOperations.OpenFile type search for the given file name. The first project found to have the item returns its ProjectItem object for the name. If the file is not found in the solution, null is returned.

Sub CreateExample()
   ' Open a solution before running this example.
   Dim soln As Solution

   ' Create a reference to the solution.
   soln = DTE.Solution

   ' Find the specified project.
End Sub
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.