Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

_Solution.Remove Method

Removes the specified project from the solution.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

void Remove (
	[InAttribute] Project proj
void Remove (
	/** @attribute InAttribute() */ Project proj
function Remove (
	proj : Project



Required. The project to remove from the solution.

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.

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

   ' Close the solution from the IDE.
End Sub

Community Additions

© 2015 Microsoft