更新: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
权限
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。