_Solution.Remove メソッド

更新 : 2007 年 11 月

指定されたプロジェクトをソリューションから削除します。

名前空間 :  EnvDTE
アセンブリ :  EnvDTE (EnvDTE.dll 内)

構文

'宣言
Sub Remove ( _
    proj As Project _
)
'使用
Dim instance As _Solution
Dim proj As Project

instance.Remove(proj)
void Remove(
    Project proj
)
void Remove(
    [InAttribute] Project^ proj
)
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

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

_Solution インターフェイス

_Solution メンバ

EnvDTE 名前空間