다음을 통해 공유


_Solution.Remove 메서드

지정한 프로젝트를 솔루션에서 제거합니다.

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

구문

‘선언
Sub Remove ( _
    proj As Project _
)
void Remove(
    Project proj
)
void Remove(
    [InAttribute] Project^ proj
)
abstract Remove : 
        proj:Project -> unit 
function Remove(
    proj : Project
)

매개 변수

  • proj
    형식: EnvDTE.Project
    필수적 요소로서,솔루션에서 제거할 프로젝트입니다.

예제

Sub RemoveExample()
   ' This function loads a solution, deletes the first project,
   ' and then closes the solution.
   Dim soln As Solution
   Dim proj As Project
   Dim msg As String

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

   ' Open the solution just created.
   soln.Open("c:\temp2\newsolution.sln")

   ' Delete the newly-created VB Console application project in 
   ' this solution.
   MsgBox("Ready to delete the project.")
   proj = soln.Projects.Item(1)
   soln.Remove(proj)
   MsgBox("Project was deleted from the solution.")

   ' Close the solution from the IDE.
   soln.Close()
End Sub

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

_Solution 인터페이스

EnvDTE 네임스페이스