Partager via


_Solution.Remove, méthode

Supprime le projet spécifié de la solution.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

'Déclaration
Sub Remove ( _
    proj As Project _
)
void Remove(
    Project proj
)
void Remove(
    [InAttribute] Project^ proj
)
abstract Remove : 
        proj:Project -> unit 
function Remove(
    proj : Project
)

Paramètres

  • proj
    Type : EnvDTE.Project
    Obligatoire.Projet à supprimer de la solution.

Exemples

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

Sécurité .NET Framework

Voir aussi

Référence

_Solution Interface

EnvDTE, espace de noms