Project.ParentProjectItem 속성

호스트 프로젝트에서 중첩 프로젝트에 대한 ProjectItem 개체를 가져옵니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
ReadOnly Property ParentProjectItem As ProjectItem
ProjectItem ParentProjectItem { get; }
property ProjectItem^ ParentProjectItem {
    ProjectItem^ get ();
}
abstract ParentProjectItem : ProjectItem with get
function get ParentProjectItem () : ProjectItem

속성 값

형식: EnvDTE.ProjectItem
ProjectItem 개체

설명

Visual Studio엔터프라이즈 템플릿 프로젝트 같은 일부 프로젝트의 경우 특히 하위 프로젝트로 항목으로 다른 프로젝트를 포함 하도록 허용 합니다. 각 해당 프로젝트는 엔터프라이즈 응용 프로그램에 대 한 서식 파일 및 포함 Visual Basic 및 Visual C++ 하위 프로젝트입니다. 있는 경우 해당 프로젝트 인터페이스 또는 래핑된 프로젝트 다음 ParentProjectItem 반환는 ProjectItem 래핑된 프로젝트 관리 되는 서식 파일 프로젝트에 있는 항목에 대 한 개체입니다.

예제

Sub ParentProjectItemExample()
   Dim proj As Project
   Dim projitems As ProjectItems
   Dim msg As String

   ' Reference the current solution and its projects and project items.
   proj = DTE.ActiveSolutionProjects(0)
   projitems = proj.ProjectItems

   ' List properties of the project and its items.
   msg = "Is the item open? " & projitems.Item(1).IsOpen & Chr(13)
   msg = msg & "The project's unique name: " & proj.UniqueName
   ' The following two properties work only if the current project 
   ' contains subprojects. If it does, then uncomment the lines to run 
   ' them.
   ' msg = msg & "The parent project item name: " & proj.ParentProjectItem.Name & Chr(13)
   ' msg = msg & "The subproject name: " & projitems.Item(1).SubProject.Name & Chr(13)
   MsgBox(msg)
End Sub

.NET Framework 보안

참고 항목

참조

Project 인터페이스

EnvDTE 네임스페이스

기타 리소스

프로젝트 및 솔루션 제어